【发布时间】:2011-12-09 13:55:07
【问题描述】:
我需要在 VS 2005 中使用 WebRTC。据我所知,为此我需要 VS 2005 SP1。否则会一直出现两个链接错误:
LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in SwitchingSampRate.obj
LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual char const * __thiscall std::exception::what(void)const" (?what@exception@std@@UBEPBDXZ) already defined in SwitchingSampRate.obj
由于某种原因,我无法安装 SP1。因此,为了避免这些错误,我尝试在 VS 2010 中构建 WebRTC 库文件,然后将它们链接到我的 VS 2005 解决方案。但是,这会带来其他类型的错误和警告(又是 2005 年):
warning LNK4229: invalid directive '/FAILIFMISMATCH:_MSC_VER=1600' encountered; ignored
error LNK2001: unresolved external symbol "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z)
unresolved external symbol "void (__cdecl* std::_Raise_handler)(class stdext::exception const &)" (?_Raise_handler@std@@3P6AXABVexception@stdext@@@ZA)
我想知道是否可以避免这些错误,以便我可以在我的 VS 2005 项目中使用 VS 2010 中生成的库。
【问题讨论】:
标签: visual-studio-2010 visual-studio-2005 shared-libraries