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: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: eric lin <ericlin at fsshl dot zzn dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 22 May 2011 14:12:16 +0100
- Subject: Re: boost library, hardtolink&compile, plz help
- References: <FAE17C2C3B8777B4CA1639D83288BC7C@ericlin.fsshl.zzn.com>
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