I am trying to use the GNU Multiple Precision (GMP) library in a C++ project. When I try to compile my code (using g++ project.cpp
) I get the following output:
Undefined symbols for architecture x86_64:
"___gmpz_clears", referenced from:
_main in project-d867c2.o
"___gmpz_inits", referenced from:
_main in project-d867c2.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
From reading related questions, it seems like there is some conflict between 32-bit and 64-bit libraries. I don't know very much about this though.
How can I resolve this conflict?