[Qt-interest] MinGW and TARGET_VERSION_EXT
Ben Swerts
benswerts at telenet.be
Tue Jul 26 20:38:19 CEST 2011
Hello all,
I have an application that is compiled using qmake. It compiles correctly
with any (recent) version of Qt/MSVC and with an older Qt4.4/MinGW3.4
combination.
Now I want to upgrade the MinGW build to Qt 4.7 and MinGW 4.4 (both from a
recent Qt SDK). Unfortunately the *.a files contain a major version and this
screws up the linking process. I don't have the old Qt/MinGW setup anymore
so I can't compare.
Here's the core of a relevant test.pro file:
TEMPLATE = lib
CONFIG += dll
TARGET = test
TARGET_EXT = .dll
VERSION = 1.0.0.0
The next one contains code to link to the other library:
LIBS += -LC:\bin -ltest
qmake'ing the test.pro file results in the linker flag
-Wl,--out-implib,C:\bin\libtest1.a
which causes the file C:\bin\libtest.a to be created. qmake-ing the other
.pro file result in a linker flag that tries to link in libtest.a causing a
lot of linker errors.
I briefly glanced over the qmake source code and noticed this major version
number is added because the qmake variable TARGET_VERSION_EXT contains this
number. Explicitly clearing this flag in the .pro file does not help.
Do you have any idea what I might need to change in the .pro files so this
works again, all without any impact on the MSVC builds?
Thanks a lot in advance.
Greets,
Ben
More information about the Qt-interest-old
mailing list