图书馆是否与VC2005和VC2010兼容?

图书馆是否与VC2005和VC2010兼容?

问题描述:

使用VC2005构建的导出库是否与VC2010兼容?

Are export libraries built with VC2005 compatible with VC2010?

我有一个用VC2005构建的DLL.当我在VC2010中使用此DLL的导出库构建程序时,链接无法在该库中找到任何导出的函数.使用VC2005构建的相同程序可以与相同的lib很好地链接. VC2010是否接受库(静态 或导出)是使用VC2005构建的?

I have a DLL built with VC2005. When I build a program in VC2010 with the export lib for this DLL, link cannot find any exported function in the lib. The same program built with VC2005 links fine with the same lib. Does VC2010 accept libs (static or export) built with VC2005?

谢谢

-pa

我当然会认为任何静态库都不兼容.至少,诸如STL之类的东西已经发生了足够的变化,以至于任何使用VC8编译的STL都无法在VC10运行时下运行.我知道我无意间尝试将VC6静态库与 前几天的VC9炸了.

I would certainly assume that any static libraries are incompatible.  At a minimum, stuff like STL has changed enough that any STL compiled with VC8 won't work under the VC10 runtime.  I know I inadvertently tried to use a VC6 static library with VC9 the other day and it blew up.

另一方面,我认为C接口的导出库仍然可以使用.不确定是否要导出C ++接口. (好吧,如果您要从DLL中导出C ++接口,则导出库可能会起作用,但是您的代码可以 容易炸毁)

On the other hand, I would think that the export libraries for a C interface would still work.  Not sure if you are exporting a C++ interface. (Well if you are exporting a C++ interface from your DLL, the export library may work, but your code could easily blow up)