Library ABI compatibility between versions of Visual Studio

后端 未结 2 457
半阙折子戏
半阙折子戏 2021-01-04 05:56

I have two scenarios. Suppose I have 3 shared libraries that export C++ symbols, each built with VS7.1, VS8, and VS9. I compile all 3 in VS9. For some reason, this works. I

相关标签:
2条回答
  • 2021-01-04 06:32

    extern "C" exported symbols are different from C++ symbols. C++ has name mangling (see http://en.wikipedia.org/wiki/Name_mangling).

    The mangling of C++ symbols may vary from compiler version to compiler version, so in your VS7/8/9 setup, the same C++ method name may be mangled to different names.

    Basically, your team seems to be right - you will be locked in the same major version of the compiler that was used to compile your library.

    0 讨论(0)
  • 2021-01-04 06:47

    The issue may be not only in ABI differences (calling conventions, etc.) between these VS versions, but also in removed/changed symbols in system DLL libraries. See this table for the detailed comparison of system DLL libraries between VS8 (2005, Windows SDK 5.0) and VS9 (2008, Windows SDK 6.0).

    See also compatibility matrix for Windows SDKs.

    0 讨论(0)
提交回复
热议问题