J
John
I have 5 native static libraries that are being compiled in Visual
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:library
libcpmtd.lib(cerr.obj) : error LNK2005: "public: __thiscall
LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall
std::exception::exception(void)" (??0exception@std@@QAE@XZ) already
defined in MSVCRTD.lib(MSVCR80D.dll)
C:\path\MixedMode.dll : fatal error LNK1169: one or more multiply
defined symbols found
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:library
libcpmtd.lib(cerr.obj) : error LNK2005: "public: __thiscall
std::basic_ostream said:::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in msvcprtd.lib(MSVCP80D.dll)
LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall
std::exception::exception(void)" (??0exception@std@@QAE@XZ) already
defined in MSVCRTD.lib(MSVCR80D.dll)
C:\path\MixedMode.dll : fatal error LNK1169: one or more multiply
defined symbols found