Using -lmpfr compiler flags for C++ on MacOS: "ld: library not found for -lmpfr"

Viewed 15

I'm compiling a simple C++ program on MacOS and when I try to compile using lmpfr with -lmpfr, I get the following error.

ld: library not found for -lmpfr

Does this mean I'm not linking the correct path? I'm on M1 and used Homebrew. Currently my path is:

-I /opt/homebrew/Cellar/mpfr/4.1.0/include/

Is that wrong?

0 Answers
Related