strange... it does not have something to do with CommonC++... i tried to link it against CC++'s .o-files and got a similar result (now with pthread)... so i guess there's an error in the commandline... or a bug in ld?!
although this is not commonc++ specifiy... input is still highly appreciated :-)...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
short question: has anyone ever succeeded in compiling a program which links to CommonC++ (ccext and ccgnu) as a static executable?
I use:
g++ -g -O2 -L/usr/local/lib -D_REENTRANT -D_THREAD_SAFW -ldl -lxml -lpthread -lccgnu -lccext timm.o html.o url.o browser.o gprofthread.o -o timm -static
and get _exactly_ the same result as if not specifying -lccext and -lccgnu while not using -static.
To make it clear.. the abovementioned command behaves just like:
g++ -g -O2 -L/usr/local/lib -D_REENTRANT -D_THREAD_SAFW -ldl -lxml -lpthread timm.o html.o url.o browser.o gprofthread.o -o timm
However... using other libs i've not encountered problems like these until now... Suggetions?
strange... it does not have something to do with CommonC++... i tried to link it against CC++'s .o-files and got a similar result (now with pthread)... so i guess there's an error in the commandline... or a bug in ld?!
although this is not commonc++ specifiy... input is still highly appreciated :-)...
It turned out, that:
g++ -static -D_THREAD_SAFE -D_REENTRANT timm.o -lccgnu -lpthread -ldl -lccext url.o html.o browser.o gprofthread.o -o timm
works... but:
g++ -static -D_THREAD_SAFE -D_REENTRANT -lccgnu -lpthread -ldl -lccext timm.o url.o html.o browser.o gprofthread.o -o timm
does not work....
very strange...