.lib 和 .dll 向后兼容性
我目前有一个 VS6 非托管 C 库,以 .lib 或 .dll 形式提供。我想升级到 VS2010,但仍有 VS6、VS2005 和 VS2008 中的用户。
VS2010 中内置的 .lib 或 .dll 可以在 VS6、VS2005 或 VS2008 中使用吗?
谢谢!
I currently have a VS6 unmanaged C library that I deliver as either a .lib or .dll. I want to upgrade to VS2010 but I still have users that are in VS6, VS2005, and VS2008.
Can a .lib or .dll built in VS2010 be used in VS6, VS2005, or VS2008?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这取决于用于构建库的运行时。当我将解决方案从 VS2005 升级到 VS2008 时,我通常会遇到这个问题。默认运行时库因版本而异。
当您构建 .lib 和 .dll 时,这些文件将与运行时的这些版本相关联。当您在不同 VS 版本之间调试程序或在非开发人员计算机上运行程序时,当使用不同运行时构建的程序集尝试跨边界传递信息时,通常会发现问题。请参阅 http://msdn.microsoft.com/en-us/library/abx4dbyh .aspx 了解详细信息。
It depends on the runtime used to build the libraries. I would typically run into this problem when upgrading solutions from VS2005 to VS2008. The default runtime libraries are different from edition to edition.
When you're building the .lib and .dll, those files are getting linked against those editions of the runtime. Problems will typically be found when you're debugging the program between different VS editions or running it on a non-developer machine when assemblies built with different runtimes attempt to pass information across boundaries. See http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx for details.
我知道这是一篇旧文章,但如果其他人遇到它,这可能会有用,从 vc6 升级到 vs2010 是一场噩梦,但还有另一种选择。可以升级到VS2010环境同时仍然使用vc6编译器。您需要的工具是 Daffodil,可以在这里找到 http://daffodil.codeplex.com/
这是我们的解决方案,因为 VS2010 环境的生产力更高。
I know this is an old post but if anyone else comes across it this may be useful, upgrading from vc6 to vs2010 is a nightmare, but there is an alternative. You can upgrade to VS2010 environment while still using vc6 compiler. the tool you need is Daffodil and can be found here http://daffodil.codeplex.com/
This was our solution because the VS2010 environment is way more productive.