Hi Andy, I think the problem is that you aren't telling GCC that you are compiling multi-threaded code. Try: g++ -pthread -c test.cpp Then: g++ -pthread test.o ../boost/stage/lib/libboost_thread-gcc-mt.a Maybe that will help, Good Luck, - Dave On Mon, 2007-04-23 at 17:56 -0400, Venikov, Andy wrote:
Hi all,
recently I had to move from Mandrake to RedHat linux.
On the new system, a simple thing like this crashes:
<------- test.cpp
#include
void * Thread1() {
//sleep some time
return 0; }
int main(int, char**) { boost::thread thread1(Thread1); thread1.join();
return 0; }
-------->
The crash happens in the create_pthread call in boost::thread constructor.
Here's the build command:
g++ -c test.cpp
g++ test.o ../boost/stage/lib/libboost_thread-gcc-mt.a -lpthread
Outuput of g++ --version:
g++ (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
Output of uname -a:
Linux joe.rps.local 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux
Everythink worked fine on Mandrake.
I followed exactly the same steps to build boost on the new system….
Thanks,
Andy.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users