Link errors using VC++ 9.0, with Boost libs compiled with VC++ 8.0
I'm compiling and linking using VC++ 9.0, and using Boost libraries built
with VC++ 8.0. Unresolved external link errors are returned. Has anyone
else had this problem? I'm going to build the Boost libraries using VC++
9.0, for use with VC++ 9.0, but I was wondering if anyone else has tried to
migrate to VC++ 9.0, and how they handled it.
An example of the link error is below.
28>libboost_unit_test_framework-vc80-mt-gd.lib(xml_report_formatter.obj) :
error LNK2019: unresolved external symbol "__declspec(dllimport) public:
__thiscall std::_Container_base::~_Container_base(void)"
(__imp_??1_Container_base@std@@QAE@XZ) referenced in function "protected:
void __thiscall std::vector
David Hartman wrote:
I'm compiling and linking using VC++ 9.0, and using Boost libraries built with VC++ 8.0. Unresolved external link errors are returned. Has anyone else had this problem? I'm going to build the Boost libraries using VC++ 9.0, for use with VC++ 9.0, but I was wondering if anyone else has tried to migrate to VC++ 9.0, and how they handled it.
I had the same problem before, my guess is that the C++ name mangling has be changed between VC9 and VC8. So I recompiled all the libraries with VC9 to solve it.
David Hartman wrote:
I'm compiling and linking using VC++ 9.0, and using Boost libraries built with VC++ 8.0.
Don't do that. There are no ABI compatibility guarantees across VC compiler versions for C++ code.
Unresolved external link errors are returned. Has anyone else had this problem? I'm going to build the Boost libraries using VC++ 9.0, for use with VC++ 9.0, but I was wondering if anyone else has tried to migrate to VC++ 9.0, and how they handled it.
You need to recompile for vc9. / Johan
participants (3)
-
David Hartman
-
gchen
-
Johan Nilsson