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 Code:
  1. QT += core
  2. QT -= gui
  3.  
  4. CONFIG += c++14
  5.  
  6. TARGET = QuantLibTester
  7. CONFIG += console
  8. CONFIG -= app_bundle
  9.  
  10. TEMPLATE = app
  11.  
  12. SOURCES += main.cpp
  13.  
  14.  
  15. DEFINES += QT_DEPRECATED_WARNINGS
  16.  
  17.  
  18. 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
  19. 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
  20.  
  21. 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
  22. 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
  23.  
  24.  
  25. INCLUDEPATH += $$PWD/../../../OneDrive/Programming/YJ_Super_Quant/YJ_Super_Quant
  26. 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.