Studio 2005 with the /MDd C Runtime option. I have 2 CLR DLLs (all
managed code) in Visual Studio 2005 and the /MDd C Runtime setting.
They are in the same solution, and compile/link without problems (Debug
configuration).
I also have 1 mixed-mode CLR DLL that consumes both the static
libraries and managed DLLs. It is configured to use the /MDd C Runtime
library. When I add it to the solution (making sure its references are
correct), it gives linking errors shown below.
I am a relatively young developer, spoiled by Java and C#. I
understand that the problems indicate an attempt to link against 2
versions of the C Runtime Library -- but I have no idea what settings
to check (or what to look for in the code) in order to resolve the
problem. I have been making sure that C++ --Code Generation -->
Runtime Library is set to /MDd for everything. Are there other
settings or places in code that could cause me to link to another
version?
Thanks for any advice you could give,
John
-----=[ Begin Example Linking Errors ]=-----
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of
other libs; use /NODEFAULTLIB:li brary
libcpmtd.lib(ce rr.obj) : error LNK2005: "public: __thiscall
std::basic_ostr eam<char,struct std::char_trait s<char>
>::basic_ostrea m<char,struct std::char_trait s<char(class std::basic_stre ambuf<char,stru ct std::char_trait s<char *,bool)" (??0?$basic_ost ream@DU?$char_t raits@D@std@@@s td@@QAE@PAV?$ba sic_streambuf@D U?$char_traits@ D@std@@@1@_N@Z) already defined in msvcprtd.lib(MS VCP80D.dll)LIBCMTD.lib(std excpt.obj) : error LNK2005: "public: __thiscall
std::exception: :exception(void )" (??0exception@s td@@QAE@XZ) already
defined in MSVCRTD.lib(MSV CR80D.dll)
C:\path\MixedMo de.dll : fatal error LNK1169: one or more multiply
defined symbols found