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

后端 未结 4 1513
感情败类
感情败类 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:35

    This conflict comes up when using different flavors of the Microsoft C-Runtime libraries. Here is an overview: http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx

    So f.e. if you are linking to msvcrt.lib (dynamic, multithreaded CRT) and one of your dependencies is linked against the libcmtd.lib (static, multithreaded) this warning comes up. This situation may lead to subtle errors and can cause all sort of problems which are hard to debug. There is not much you can do to get rid of the warning than set the conflicting library to the ignore list and hope for the best if you have no control over the dependencies. In general it is a good idea to use the same C/C++ runtime linkage for all dependencies and the program itself.

提交回复
热议问题