简体   繁体   中英

Crypto++ build with msvc /MDd cryptlib.lib Can't find cryptopp.lib when linking

I built the last available version of the library (5.6.5) wanting to use it in a Qt msvc project. The issue is, that the linker want's for some reason the cryptopp.lib that is produced when building the fips dll.

This is my config (only the relevant):

INCLUDEPATH += $$PWD/thirdparty/Win/cryptopp/include
LIBS += -L$$PWD/thirdparty/Win/cryptopp/debug/ -lcryptlib

The compiler output:

LINK : fatal error LNK1104: cannot open file 'cryptopp.lib'

EDIT: The link command + the result: Which the result is the same as above.

link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:MSVCRT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\\QtTrafficBrowser.exe @C:\\Users\\Mij\\AppData\\Local\\Temp\\QtTrafficBrowser.exe.1316.6203.jom LINK : fatal error LNK1104: cannot open file 'cryptopp.lib' jom: C:\\Users\\Mij\\qt_creator\\qtTrafficBrowser\\build-QtTrafficBrowser-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\\Makefile.Debug [debug\\QtTrafficBrowser.exe] Error 1104 jom: C:\\Users\\Mij\\qt_creator\\qtTrafficBrowser\\build-QtTrafficBrowser-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\\Makefile [debug] Error 2

I am not trying to use the DLL!! I know it's different and I knew it from the start so stop asking me not to use it. The problem is that when linking with cryptlib.lib the linker asks for cryptopp.lib also. Is it clear?

I was dumb. I added the dll.h into my project, that's why it was asking for the cryptopp.lib. Removed it, and boom, works.

People having a similar issue, look at this also. LNK1104 Cryptopp.lib with CRYPTOPP_DEFAULT_NO_DLL defined in dll project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM