LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library

后端 未结 4 1453
感情败类
感情败类 2021-02-05 12:06

When I try to build my sources linking with libeay32.lib. I have built this locally from OpenSSL sources. I encountered the above warning \"LINK : warning LNK4098: defaultlib \'

4条回答
  •  感情败类
    2021-02-05 12:08

    If i understand it right you are mixing a release version of OpenSSL with a debug version of your program that causes different CRT versions to be used, since you haven't posted actual settings it may be even worse that OpenSSL is using DLL CRT while your code static. Please post what kind of CRT is your program using (can be found by clicking Properties on the project and then Configuration Properties -> C/C++ -> Code Generation -> Runtime Libarary). Either use proper OpenSSL version (e.g. build it with debug info and linked to debug CRT) or, since you are stating you cannot recompile OpenSSL, compile your code with Multi-threaded DLL in release without optimizations so you get a program that can be debugged and uses the same CRT as OpenSSL. That should solve it I guess.

提交回复
热议问题