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
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
To copy to clipboard, switch view to plain text mode
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.
Bookmarks