首页| 论坛| 消息

标题:【提问】关于使用QT的VC 2003 project的链接错误
作者:heg48854
日期:2005-12-05 11:57
内容:

我正在编译一个使用了QT的VC .net2003的程序(也许有人知道,就是最近刚放出的Dr. Divx2),为了编译它,我安装了QT 4.0.1的评测版,其它的都还好,就是在最后Link时出现了以下错误,请高手们指点,谢谢。
msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: "public: __thiscall bad_cast::bad_cast(char const *)" (??0bad_cast@@QAE@PBD@Z) already defined in LIBCMT.lib(stdexcpt.obj)
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: __thiscall std::basic_string::~basic_string(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in AdvancedSettingsWidget.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: class std::basic_string & __thiscall std::basic_string::operator+=(class std::basic_string const &)" (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in job.lib(JobBatchImpl.obj)
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: __thiscall std::basic_string::basic_string(class std::basic_string


#1 [heg48854 12-07 12:43]
问题搞明白了,原来是QTMaind.lib这个库不支持多线程的链接,需要对这个库重新编译,使之支持VC的/MT连接参数,其实我也不知道如何编译QTMaind.lib让它支持多线程,幸好Dr.DIVX的开发人分享了已经编译好的。
#2 [xuxinshao 02-16 22:53]
这个问题我也碰到了,连接参数改为/MDd就可以了

回复 发表
主题 版块