Static link of cryptopp lib to Qt-app



  • Hi guys,

    I want to use cryptopp in one of my projects. As I don't want to use a dll for security reasons, I have to compile cryptopp into my application.
    I thought to compile a lib from visual studio and add it as a static lib to my Qt-project.
    Unfortunately Qt gives me linker errors

    cryptlib.lib(cryptlib.obj):-1: error: LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj
    

    I'm using the windows binaries of Qt so it's probably built with /MD
    Is it even possible to statically add a lib in my Qt-version without recompiling Qt with /MT ?

    CU
    mts


  • Lifetime Qt Champion

    Hi,

    AFAIK, no, however you can build cryptopp statically while still linking to the dynamic runtime, then you'll be able to link it to your Qt application.


Log in to reply
 

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