Boost logo

Threads-Devel :

Subject: Re: [Threads-devel] statically linked example on Linux segfaults when exception is thrown
From: Anthony Williams (anthony_at_[hidden])
Date: 2010-03-23 13:03:56

On 23/03/10 16:58, Neetu Garg wrote:
> Thanks Anthony,
> I added "-pthread" while compilation as well as while linking, I am still getting segfaults.
> # g++ -c -pthread -I. -I/usr/local/include/boost-1_38 -I/usr/include testThreadException.cpp -o testThreadException.o
> # g++ -pthread testThreadException.o -static -L/u/test/lib -lboost_thread-gcc41-mt -lpthread -o testThreadException

That is strange. It may be something to do with the C++ runtime. Does it
work with dynamic linking?


Author of C++ Concurrency in Action
just::thread C++0x thread library   
Just Software Solutions Ltd
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

Threads-Devel list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at