Visual linker linker alarm LNK4098

I have a dll project in which, when I create a project in the Release configuration, I get the following warning:

MSVCRT.lib (cinitexe.obj): warning LNK4098: defaultlib 'msvcrtd.lib' conflicts using other libraries; usage / NODEFAULTLIB: library

This is just a warning, but I don't know if this should be taken into account.

For what I learned, they are multithreaded libraries, regular and debug versions. My dll uses multithreading and I can debug it, although I use boost: thread for it, so I really don't know if I need these specific Windows libraries for debugging or release ...

Regards, Alex

Well, I did as BuschnicK suggested, and using the link / VERBOSE: LIB flag, I found out that I was contacting these libraries in the Debug configuration:

boost_filesystem-VC100-mt-GD-1_44.lib: libboost_system-VC100-mt-GD-1_44.lib: libboost_thread-VC100-mt-GD-1_44.lib: libboost_date_time-VC100-mt -G.D.-1_44.lib:

I had the same thing in Release config, mainly because I did not specify "explicitly" then. So I changed them in Release:

boost_filesystem-VC100-mt-1_44.lib: libboost_system-VC100-mt-1_44.lib: libboost_thread-VC100-mt-1_44.lib: libboost_date_time-VC100-t-1_44.lib:

It seems to have worked, but I still got the first warning until I realized that I also had the _DEBUG preprocessor definition in my release configuration, deleted it, and now it works sweetly.

Thank you all for your help!

+5
2

, .

, .

+7

, , : "MSVCRT.lib" "msvcrtd.lib"

"d" . , ++ runtime (MSVCRT). , - (, "d" ). , , , , .

, / , . project propertiesC/C++Code GenerationRuntime Library. , "" " " .

, dll.

+10

All Articles