Boost logo

Boost Users :

Subject: Re: [Boost-users] MPFR in Boost 1.45.0
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-02-02 04:18:44


> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net