boost library, hardtolink&compile, plz help

Jonathan Wakely jwakely.gcc@gmail.com
Sun May 22 18:49:00 GMT 2011


On 22 May 2011 13:14, eric lin <ericlin@fsshl.zzn.com> wrote:
> dear Jeff or gnu g++ programers:
>  I tried your suggestion(maybe I am not figure your words correctly, then why not
> using command rather than English)
> -------
> eric@eric-laptop:~/cppcookbook$ g++ -I/home/eric/boost1/boost_1_46_1/ example12-1.cpp -Lboost_thread-mt

No, you didn't understand.  -L is used to name a directory where
libraries live, like -I is used to name a directory where headers
live.

Have you build the boost libraries yet?
If you haven't then you need to do that first.

Then do

g++ -I/home/eric/boost1/boost_1_46_1/ example12-1.cpp
-L/path/to/boost/libraries -lboost_thread-mt



More information about the Gcc-help mailing list