PDA

View Full Version : Qt Creator: pro file settings for multiple build using VC 2015



LSantoshKSingh
17th July 2017, 12:26
Hi,

I am creating a library as DLL. I am building both 32 bit and 64 bit version of library. Compiler is VS Express-2015.
When I build the main program I want that it should link to 32bit version of library, if the build is 32 bit; otherwise It should link to 64 bit library. Therefore I am using following "pro" file, but it is not linking when I build in 64 bit version

QT += core
QT -= gui

CONFIG += c++14

TARGET = QuantLibTester
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp


DEFINES += QT_DEPRECATED_WARNINGS


win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../YJ_Super_Quant/build-YJ_Super_Quant-Desktop_Qt_5_9_0_MSVC2015_32bit-Debug/release/ -lYJ_Super_Quant
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../YJ_Super_Quant/build-YJ_Super_Quant-Desktop_Qt_5_9_0_MSVC2015_32bit-Debug/debug/ -lYJ_Super_Quant

win64:CONFIG(release, debug|release): LIBS += -L$$PWD/../YJ_Super_Quant/build-YJ_Super_Quant-Desktop_Qt_5_9_0_MSVC2015_64bit-Debug/release/ -lYJ_Super_Quant
else:win64:CONFIG(debug, debug|release): LIBS += -L$$PWD/../YJ_Super_Quant/build-YJ_Super_Quant-Desktop_Qt_5_9_0_MSVC2015_64bit-Debug/debug/ -lYJ_Super_Quant


INCLUDEPATH += $$PWD/../../../OneDrive/Programming/YJ_Super_Quant/YJ_Super_Quant
DEPENDPATH += $$PWD/../../../OneDrive/Programming/YJ_Super_Quant/YJ_Super_Quant


the line:

win64:CONFIG(release, debug|release): LIBS += -L$$PWD/../YJ_Super_Quant/build-YJ_Super_Quant-Desktop_Qt_5_9_0_MSVC2015_64bit-Debug/release/ -lYJ_Super_Quant
else:win64:CONFIG(debug, debug|release): LIBS += -L$$PWD/../YJ_Super_Quant/build-YJ_Super_Quant-Desktop_Qt_5_9_0_MSVC2015_64bit-Debug/debug/ -lYJ_Super_Quant

has no effect in linking to 64 bit library when building for 64 bit. I want to make my application available as both 32 bit and 64 bit version, and there are many other dlls, including GNU gsl, so I want it to be automated.

Please help. Thanks.