PDA

View Full Version : LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with us



Teerayoot
25th June 2009, 15:46
I have search but no answer found ,
question is :

msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
LIBCMT.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library

i need to get rid of

C:\WINDOWS.X86\WinSxS\x86_Microsoft.VC90.CRT_1fc8b 3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\MSVCR90.dll
dll hell

so i need to compile with /MT switch

please help me.

freezeblue
29th June 2009, 09:49
If you turn on MT, you must use /NODEFAULTLIB switch to ignore these libraries: libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib, otherwise you will get link problem.