
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 Actually, simply including <boost/math/bindings/mpfr.hpp> gives the following three errors (i.e. commented out the contents of main): boost_mpfr_example.o: In function `MpFrC::get_base()': boost_mpfr_example.cpp:(.text._ZN5MpFrC8get_baseEv[MpFrC::get_base()]+0x6): undefined reference to `MpFrC::base' boost_mpfr_example.o: In function `MpFrC::get_rnd()': boost_mpfr_example.cpp:(.text._ZN5MpFrC7get_rndEv[MpFrC::get_rnd()]+0x6): undefined reference to `MpFrC::rnd' boost_mpfr_example.o: In function `std::basic_istream<char, std::char_traits<char> >& operator>><__mpfr_struct [1]>(std::basic_istream<char, std::char_traits<char> >&, __gmp_expr<__mpfr_struct [1], __mpfr_struct [1]>&)': boost_mpfr_example.cpp:(.text._ZrsIA1_13__mpfr_structERSiS2_R10__gmp_exprIT_S4_E[std::basic_istream<char, std::char_traits<char> >& operator>><__mpfr_struct [1]>(std::basic_istream<char, std::char_traits<char> >&, __gmp_expr<__mpfr_struct [1], __mpfr_struct [1]>&)]+0x2a): undefined reference to `operator>>(std::basic_istream<char, std::char_traits<char> >&, __mpfr_struct*)' collect2: ld returned 1 exit status I have MPFR 3.0.0-2 (ubuntu packages: libmpfr-dev, libmpfr4), gmp 4.3.2 (libgmp3-dev, libgmp3c2, libgmpxx4ldbl), and gmpfrxx ( http://math.berkeley.edu/~wilken/code/gmpfrxx/). I note that gmpfrxx was "Last updated 2008/11/16 to incorporate new features of MPFR 2.3.*" Has anyone got MPFR 3.0.0 working with boost 1.45.0 and if so, what was your setup? cheers, Novak. On 1 February 2011 09:38, John Maddock <boost.regex@virgin.net> wrote:
I get a large number of compile errors (attached).
Those are all linker errors not compiler errors - are you linking to the correct libraries?
HTH, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users