
2 Feb
2011
2 Feb
'11
9:18 a.m.
Yes, you're right. The object file is compiled ok:
g++ -I/path/to/boost_1_45_0 -lgmpfrxx -lmpfr -lgmpxx -lgmp -c boost_mpfr_example.cpp
but linking fails in building the executable:
g++ -I/path/to/boost_1_45_0 -lgmpfrxx -lmpfr -lgmpxx -lgmp boost_mpfr_example.o -o boost_mpfr_example
This is a GCC issue - the libraries being linked to must appear *after* the source files that need them. John.