Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.lib and .dll Backward Compatibility

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!

like image 493
user265445 Avatar asked Jun 21 '10 19:06

user265445


2 Answers

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.

like image 124
villecoder Avatar answered Oct 21 '22 12:10

villecoder


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.

like image 37
user655261 Avatar answered Oct 21 '22 10:10

user655261