I needed to install Qt SDK to Redhat backend machine which does not have a GUIs. (Amazon ec2). When I tried to install it failed due to fail to connect display.
Then I tried to download the source and compile. If I use configure -debug, it only compile debug libraries. Same as it compiles and install release binaries only if I specify -release. Also in my *.pro file it links the last installed build without considering CONFIG += debug or CONFIG += release
I need both formats. libQt5Core.so and libQt5Core.d.so. And need to link separate libs according to the CONFIG.
I resolved the issue doing this.
configure -debug -qtlibinfix .d
and installed.configure -release
and installed again.Now I have two binaries *.d.so
for debug and *.so
for release in /usr/local/Qt-5.6.0
.
Then edited /usr/local/Qt-5.6.0/mkspecs/features/qt.prf
and replaced
MODULE_MODULE = $$eval(QT.$${QTLIB}.module)
with
MODULE_MODULE =
debug: MODULE_MODULE = $$eval(QT.$${QTLIB}.module).d
else: MODULE_MODULE = $$eval(QT.$${QTLIB}.module)
If I used CONFIG += debug
in *.pro file, it links with *.d.so
. Otherwise it links with *.so
.
If you want both sets of libraries you can use the configure -debug-and-release
option. Take a look at the Configuration Options for Qt for more options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With