【问题标题】:error LNK2005: _exit already defined in msvcrt.lib(MSVCR90.dll)_LIBCMTD.lib?错误 LNK2005:_exit 已在 msvcrt.lib(MSVCR90.dll)_LIBCMTD.lib 中定义?
【发布时间】:2013-01-06 14:03:32
【问题描述】:

您好,我在我的应用程序中使用 libjpeg 库和 libpng 库... 当我在调试模式下编译我的应用程序时......它工作正常...... 但是当我在发布模式下编译我的应用程序时,我得到以下链接错误......

 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

错误 43 错误 LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) 已经在 MSVCRT.lib(ti_inst.obj ) F:\Work Projects\SnackCards

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

【问题讨论】:

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


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 2010-09-25
      • 1970-01-01
      • 2011-02-13
      • 2014-01-22
      • 2012-04-25
      • 1970-01-01
      • 2014-12-21
      • 2015-08-10
      • 2010-10-11
      相关资源
      最近更新 更多