Library order
-
Hi.
I've successfully build Qt statically but now I have link problems. I am trying to link -lXext -lz with:
LIBS += -lXext -lzBut the libraries are being passed as parameters before the Qt libraries:
g++ -static-libgcc -Wl,-rpath,/usr/local/lib -o fr main.o moc_main.o -L/usr/local//lib -lXext -lz -lpthread -lQt3Support -lQtGui -lQtCoreAnd I get undefined references:
/usr/local//lib/libQtCore.a(qbytearray.o):qbytearray.cpp:(.text+0x38c0): undefined reference to `_compress2'How do I tell qmake to pass "-lXext -lz" after "-lQt3Support -lQtGui -lQtCore"?
-
I found a solution using brute force:
http://bugreports.qt.nokia.com/browse/QTBUG-20342?focusedCommentId=158731#comment-158731