Hello.
I have written an application in VS C++ 2010 Express Edition which consists of some DLLs and also depends on some third party DLLs. The application itself is a DLL.
As it turned out, to make it work on another machine, user has to install VS 2010 redistributable runtime.
I tried to build my DLL with flag /MT instead of /MD - I believe this means that I want static linking.. However, in this case I got 'multiple definition' errors about MSCVRT.lib. Error message also suggested to use flag /NODEFAULTLIB:msvcrt.lib to avoid this. However, with these settings my application still requires runtime installation.
Could somebody please explain me how to avoid this?
Thanks, Robusta
Update: if I simply use /MT flag instead of /MD I get the following error
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)
Creating library C:\MyApp\Release\MyApp.lib and object C:\MyApp\Release\MyApp.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
C:\MyApp\Release\MyApp.dll : fatal error LNK1169: one or more multiply defined symbols found
after adding flag /NODEFAULTLIB:library I get no errors, application is built successfully, but still requires runtime installation.
Is it possible that 3rd party libraries, which I also link, require runtime?