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
Ian Lance Taylor <iant@google.com> writes:
> "eric lin" <ericlin@fsshl.zzn.com> writes:
>> 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.
I think typically boost "packages" that have a run-time component (many
don't) each has its own library.
For instance, on this system, the boost thread package needs to be
linked against like "-lboost_thread-mt".
-Miles
--
It wasn't the Exxon Valdez captain's driving that caused the Alaskan oil spill.
It was yours. [Greenpeace advertisement, New York Times, 25 February 1990]