|
Boost Users : |
From: Ryan Melville (eng-list_at_[hidden])
Date: 2008-06-24 14:06:41
"Wayne Russell" <wrussell.mail_at_[hidden]> wrote in message
news:b8928dab0806220111n4970a0deuc87bf4941601f7a7_at_mail.gmail.com...
> Hi All
>
> I'm new to using Boost and have a (hopefully simple) linker problem.
>
> I'm compiling using gcc 4.2.1 under OpenSUSE 10.3 and get the following:
>
> ---
> Invoking: GCC C++ Linker
> g++ -o"TestTransporter"
> ./src/TestTransporter.o -lrt -lpthread -lboost_thread
> ./src/TestTransporter.o: In function `thread<void (*)()>':
> /usr/include/boost/thread/pthread/thread.hpp:151: undefined reference
> to `boost::thread::start_thread()'
> ---
>
Hi,
I've not used "-l" to link with the Boost thread library before. Perhaps
the name you use has to be more complete (include the gcc42-mt part) or the
path isn't in your default library path.
You may try explicit static linking to the library by adding something like
"/usr/lib/libboost_thread-gcc42-mt.a" to your gcc command line. Check your
system for the exact path/file name.
Regards,
Ryan
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