Visual studio 2010 在VS 2010中构建用于VS 2005的LIB?

Visual studio 2010 在VS 2010中构建用于VS 2005的LIB?,visual-studio-2010,visual-studio-2005,shared-libraries,Visual Studio 2010,Visual Studio 2005,Shared Libraries,我需要在VS2005中使用WebRTC。据我所知,为此我需要VS2005SP1。否则,始终会出现两个链接错误: 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.

我需要在VS2005中使用WebRTC。据我所知,为此我需要VS2005SP1。否则,始终会出现两个链接错误:

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。所以为了避免这些错误,我尝试在VS2010中构建WebRTC lib文件,然后将它们链接到我的VS2005解决方案。但是,这会带来其他类型的错误和警告(这是在2005年):


我想知道这些错误是否可以避免,这样我就可以在VS 2005项目中使用VS 2010中生成的LIB。

您不能将LIB链接到使用其他版本的visual studio构建的程序

真的吗?Chris Becke对一个类似问题的回答如何?他说:“只要库API只使用原始类型,并且不尝试释放()传入的指针,或者将指针传递给内部malloc()'的内存,它们希望应用程序(或另一个库)释放()就可以了。”既然你使用的是第三方LIB,你确定你会满足这一要求吗。原始类型=内置类型?所以如果它是一个C++库,除非它是用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)