图书馆是否与VC2005和VC2010兼容? [英] Libraries bulit with VC2005 and VC2010 compatible?

查看:60
本文介绍了图书馆是否与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)


这篇关于图书馆是否与VC2005和VC2010兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆