6

Hi i am using libjpeg lib and libpng lib in my application... when i compile my application in debug mode..it is working fine... But when I compile my application in release mode i am getting following link error...

 Error    41  error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in MSVCRT.lib(ti_inst.obj)   F:\Work Projects\SnackCards XAML\SimpleGame\SimpleGame\LIBCMT.lib(typinfo.obj)  SimpleGame

Error 43 error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in MSVCRT.lib(ti_inst.obj) F:\Work Projects\SnackCards

anybody have suggestion about this error?

kai chen
  • 358
  • 4
  • 19

1 Answers1

8

You are likely using different C runtimes in the libraries and your application. Check the project settings. Libcmt is the staticically linked multi-threaded run-time, while msvcrt is the dynamically linked version.

Check that the settings match in your project properties under

C/C++->Code Generation->Runtime Library
Ralf
  • 9,405
  • 2
  • 28
  • 46