static linking of pthread crashes with segfault

Jonathan Wakely
Mon May 3 13:11:00 GMT 2010

On 3 May 2010 10:37, Klaus Rudolph wrote:
> g++ -static -O2 main.cpp /usr/lib/libpthread.a -o linux

You could try -static -pthread instead of specifying the static lib

Please take any follow up questions to the gcc-help list, your
question is not appropriate for this list.



More information about the Gcc mailing list