Alexander  Shmuratko
Alexander Shmuratko

Reputation: 341

Building libs in VS 2010 for use in VS 2005?

I need to use WebRTC in VS 2005. As far as I've found out, I need VS 2005 SP1 for this purpose. Otherwise, two link errors appear all the time:

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

I can't install SP1 for some reason. So to avoid these errors, I tried to build WebRTC lib-files in VS 2010 and then to link them to my VS 2005 solution. However, this brings about other kinds of errors and warnings (this is in 2005, again):

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)

I wonder, if these errors could be avoided, so that I could use the libs generated in VS 2010 in my VS 2005 project.

Upvotes: 1

Views: 3277

Answers (1)

puikos
puikos

Reputation: 300

You can't link libs to a program built with another version of visual studio.

Upvotes: 2

Related Questions