[VS2012] Can't Compile with /MT

I just changed linking from /MD to /MT, so the user doesnt have to use redistributable packages and what not, unfortunatelly, I'm getting these errors with /MT (works fine with /MD)

1>MSVCRT.lib(MSVCR110.dll) : error LNK2005: _strncpy_s already defined in LIBCMT.lib(strncpy_s.obj)
1>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)
1>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)


any suggestions? I'm using my own static lib, PathSocket.lib with PathSocket.h
I "fixed" this problem with /FORCE:MULTIPLE linker command, BUT I'd still like to know how to normally fix this, where's the problem?
These usually happens if you mix debug and release libraries. Compile all libraries that you use using exactly the same compiler options.
+1 modoran

@ OP: Some of your code is still trying to link to the redistributable Dynamic library "MSVCRT.lib". So like modoran said, you need to double check how the libraries you are using were compiled. I'm not sure if this will help but it's handy to have either way: http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx
Well, I created empty project just like everytime and made everything from scratch, I'm compiling for release and only library I added was my PathSocket lib, which is also compiled for release and I'm using release version

okay, I got it, I forgot to change my library to /MT
Topic archived. No new replies allowed.