This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: boost library, hardtolink&compile, plz help
- From: Ian Lance Taylor <iant at google dot com>
- To: "eric lin" <ericlin at fsshl dot zzn dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 21 May 2011 11:06:11 -0700
- Subject: Re: boost library, hardtolink&compile, plz help
- References: <15D79DC34BAD46E43B8EF57C91E20158@ericlin.fsshl.zzn.com>
"eric lin" <ericlin@fsshl.zzn.com> writes:
> I follow your hint, but after that I still get a lot compile error
> ----------
> eric@eric-laptop:~/cppcookbook$ g++ -I/home/eric/boost1/boost_1_46_1/ example12-1.cpp
> /tmp/ccd4Cx51.o: In function `main':
> example12-1.cpp:(.text+0x30): undefined reference to `boost::thread::join()'
These errors, from the linker, mean that you are not linking against the
Boost library. You need to add something like -lboost with some -L
option which points to the directory where libboost.so or libboost.a can
be found.
Ian