.lib and .dll Backward Compatibility

本秂侑毒 提交于 2019-12-05 18:16:26

问题


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!


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/3088040/lib-and-dll-backward-compatibility

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!