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

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

    The thing is that you are linking your application to the runtime dynamically /MD in the VS (by default, which means that you should provide the Visual Studio Redistributable Package with your app).

    Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library

    Whereas the opensll lib by default links to the runtime statically (runtime contains for example the implementation of the STL). It is not good to mix the runtime linking thus the warning. You can fix the problem by recompiling the opensll library using dynamic linking to the runtime.

    Please follow: http://developer.covenanteyes.com/building-openssl-for-visual-studio/ then in the

    ms\nt.mak

    change \MT to \MD before running nmake -f ms\nt.mak and nmake -f ms\nt.mak install

提交回复
热议问题