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 http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976