Qt4-preview-feedback Archive, May 2007
qmake command join() problem
Message 1 in thread
Hi,
The resulting value of the join() command has changed from Qt 4.2 to Qt
4.3 (20070429).
Here is what I did before:
# My libraries
MyLibs = -lfirst \
-lsecond
# This adds debug suffix to MyLibs list of libraries
CONFIG(debug, debug|release) {
unix:LIBS += $$join(MyLibs,"_debug ",,_debug)
else:LIBS += $$join(MyLibs,"d ",,d)
} else {
LIBS += $$MyLibs
}
The result on linux platform with Qt 4.2 was:
-lfirst_debug -lsecond_debug
The result with Qt 4.3 is:
"-lfirst_debug -lsecond_debug"
join() added unexpected " characters before the result and after it.
This make the linker trying to link against one entity ("-lfirst_debug
-lsecond_debug") instead of two separated libraries!
Is this a bug or a new feature?
A workaround is to due the following:
CONFIG(debug, debug|release) {
for(lib, MyLibs) {
unix:LIBS += $$join(lib,,,_debug)
else:LIBS += $$join(lib,,,d)
}
} else {
LIBS += $$MyLibs
}
Best regards,
Alexandre
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx