Make sure that you built dtl.lib and the example program using the
same microsoft runtime C library. For example
msvcprtd.lib
stands for the microsoft visual C++ runtime debug. Make sure the
example and lib project were built with the same compile flags for
the C++ runtime library they are using (e.g. Multi-threaded debug,
or whatever).
See previous posts in the forum on this. I really need to add this
to the FAQ.
------
The problem is that the linker tries to combine different,
incompatible versions of the Visual C++ runtime library into a single
binary. This happens when not all parts of your project and the
libraries you link against are generated with the same code
generation options in Visual C++.
http://forum.dcmtk.org/viewtopic.php?t=35
--- In DatabaseTemplateLibrary@yahoogroups.com, "Kev" <chkev2001@...>
wrote:
>
> Hi,
> this time, I try to compile the DTL example program under window
XP
> with MSVC2005, I can build the DTL porject (DTL.lib) successfully
(with
> lots of warning), however, when I continue to build the example
> project, it fails and gives errors like:
>
> msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: __thiscall
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> >::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> >(class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)" (??0?$basic_string@DU?
> $char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
> has already defined in DTL.lib(variant_row.obj)
>
> please help...
>