Library ABI compatibility between versions of Visual Studio

后端 未结 2 488
半阙折子戏
半阙折子戏 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.

提交回复
热议问题