Boost logo

Boost Users :

From: Wayne Russell (wrussell.mail_at_[hidden])
Date: 2008-06-22 04:11:00

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()'
The code is quite simple:
#include <iostream>
#include <string>
#include <boost/thread/thread.hpp>
void foo ()
int main(int argc, char *argv[])
	std::cout << "!!!Hello World!!!" << std::endl; // prints !!!Hello World!!!
	boost::thread test_thread (&foo);
	return 0;
I've compiled the thread tests all ok and used the "-d+2" option but
couldn't see any additional link options that I don't already have.
Can anyone shine light on this for me?

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at