visual-c++ - 错误 LNK2005 : _exit already defined in msvcrt. lib(MSVCR90.dll)_LIBCMTD.lib?

标签 visual-c++ linker compiler-errors dev-c++

嗨,我在我的应用程序中使用 libjpeg lib 和 libpng lib...
当我在 Debug模式下编译我的应用程序时......它工作正常......
但是当我在 Release模式下编译我的应用程序时,我收到以下链接错误...

 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



有人对这个错误有什么建议吗?

最佳答案

您可能在库和应用程序中使用了不同的 C 运行时。检查项目设置。 Libcmt 是静态链接的多线程运行时,而 msvcrt 是动态链接的版本。

检查项目属性中的设置是否匹配

C/C++->Code Generation->Runtime Library

关于visual-c++ - 错误 LNK2005 : _exit already defined in msvcrt. lib(MSVCR90.dll)_LIBCMTD.lib?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14473844/

相关文章:

c++ - COleDataSource/COleDropTarget 取消拖放操作

c - PULMon 无法构建 (LNK2019)

c++ - ICU 无法解析的外部符号

c - 如何在 lib 错误中获取未解析的外部?

c++ - MSVC : Implicit Template Instantiation, 虽然未使用模板化构造函数

c++ - 未调用基类构造函数?

c++ - 关于派生类成员隐藏基类成员的警告

C++ 错误 : no matching function for all to

scala - 为什么编译器不在封闭类中查找方法?

c++ - MSVC++2010 中带有默认值的部分模板特化