Linking third party library for debug and release



  • I was wondering, how to configure the pro file to compile different versions of a third party library. I have a library that has a 32bit version in release and debug version and a 64bit verrsion in release and debug version.
    How to do that?


  • Qt Champions 2017

    Hi

    something like

    CONFIG += 32bit // or 64

    CONFIG(32bit) {
    LIBS += -L<path to 32bit libraries>
    }
    CONFIG(64bit) {
    LIBS += -L<path to 64bit libraries>
    }

    or

    contains(QT_ARCH, i386) {
    message("32-bit")
    } else {
    message("64-bit")
    }


  • Lifetime Qt Champion

    Hi,

    To add to @mrjj

    CONFIG(debug, debug|release) {
    # debug config
    }
    

    and

    CONFIG(release, debug|release) {
    # release config
    }
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.