Thursday, April 02, 2009 2:54 PMHi,
I plan to upgrade my VS 2003 to VS 2008, but am worried about compatibility across the two versions. In particular, I have a third party application that is compiled in 2003 (this cannot be changed) and am developing extensions as DLLs for this application. So my question is whether a DLL compiled with Visual C++ 2008 can be called without problems from an application compiled with 2003. Does this work?
Apart from binary compatibility, I'm mainly worried about the fact that I would end up with two different runtime libraries (the 2003 from the application and the 2008 from my DLLs). Is this a problem?
Did I forget other common pitfalls?
Thanks a lot,
Thursday, April 02, 2009 3:27 PMIn general, there is no binary compatibility between modules complied with different versions of VC. It will most certainly fail if you exchange library objects (C++ standard library, MFC...) across the boundary.
Having two versions of the CRT is not necessarily fatal, but it will be if the modules exchange memory across the boundary.
If the DLL is a COM DLL it will work, because the COM interface is designed for binary compatibility, independent of the compiler.
David Wilkinson | Visual C++ MVP
- Marked As Answer by Rong-Chun Zhang Thursday, April 09, 2009 11:28 AM
Tuesday, December 15, 2009 11:28 PMWhat about on 64-bit Windows? On Windows XP SP3, we have a case where a 32-bit Visual Studio 2008 SP1 C++ native application succesfully uses a 32-bit COM dll that is built with Visual Studio 2003 SP1. On 64-bit Windows Vista SP1 or Windows 7, this same scenario crashes.
Is this binary compatibility through COM supported on WOW64?
Wednesday, December 16, 2009 12:12 AMDuplicate post. Let's leave this thread closed.