   [SOLVED] [C++] Another library problem
  Hi all,I have a MS VC++ 8.0 solution which consists of 4 projects, all written in C++:Project Utils: Output file = Utils.lib - A bunch of utility classes and functions.Project ZThread: Output file = ZThread.lib - Eric Crahen's ZThreads. Project ATS_Lib: Output file = ATS_Lib.lib - A library which depends on both Utils.lib and ZThread.lib.Project ATS_Server: Output file = ATS_Server.exe - The actual program. Depends on ATS_Lib.lib. Also uses stuff from Utils and ZThread.Any project that depends on the output of another project has been given a reference to that particular dependency (Properties -> References). I'm not getting any unresolved depedency errors anymore. HOWEVER, I get tons of linker errors saying things like Quote:1>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> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in ats_lib.lib(ATS_ByteVector.obj)So it looks like one of my libraries has already included that stuff and then when my main program pulls that same stuff in again, then of course it's in there twice! I guess. How can I solve this problem?[Edited by - Red Ant on June 17, 2006 11:02:32 AM]
  Make sure to use the same version of the runtime library in each and every project (e.g. "Multi-threaded DLL"). The error suggests that one or more of your libraries use the static runtime library, while the main program uses a different (i.e. dynamic or different threading-model) version.You can find the runtime library in the project properties under the C/C++-tab, section "Code Generation", IIRC.HTH,Pat.   ;  They're all using multi-threaded debug. :(P.S. Bah, they're not. One of them was using multi-threaded debug DLL. I'm a fruitcake! =p   