cryptlib.lib error: LNK2038: mismatch detected for 'RuntimeLibrary'
-
Hi, I want to use cryptopp v8.5 for AES encryption in my project.
I built the cryptlib.lib files from source files in MSVC2019. And it was successful.
I have added the same to the project by adding below lines in .pro file.CONFIG(debug,debug|release){ LIBS += ../Win32/Output/Debug/cryptlib.lib }else{ LIBS += ../Win32/Output/Release/cryptlib.lib }
Included the paths too where Crypto folder contains all the header files-
INCLUDEPATH += ../Crypto
I'm running into handful of linking errors
Tried lot of solutions but not fixed still. My VS RTL setting looks like this for DEBUG-
And for RELEASE -
Where do I make changes to properly compile? in VS or Qt?
I tried multiple combinations in VS project settings already with MTd, MT, MDd, MD.
Thanks. -
Hi,
Since you are building cryptopp in Visual Studio, the changes should be done there.
The correct values are the MD ones.
Are you sure the output path of the build stays the same ?
In any case, if changing the runtime linked does not change the build output of your application, I would nuke the output folder of the cryptopp build to ensure the libraries are generated again.
-
Hi,
Since you are building cryptopp in Visual Studio, the changes should be done there.
The correct values are the MD ones.
Are you sure the output path of the build stays the same ?
In any case, if changing the runtime linked does not change the build output of your application, I would nuke the output folder of the cryptopp build to ensure the libraries are generated again.
-
MD/MT is unrelated to the type of libraries you are building, they are related to the runtime used by your library/application. A static library can have dynamic dependencies.
As for .lib files, they are both for static libraries as well as import libraries. The import libraries is usually small and will only contain the information required to link the library and you will need the .dll at runtime. Unless you have a really small library, the usual way to check which version it is is the size of the .lib file.