locked
Interoperability of different compiler versions RRS feed

  • Question

  • I'm developing a DLL that will be used by a customer using Visual Studio 6, and it will in turn connect to vendor DLL's developed with the same tools. How interoperable are DLL's developed by the latest MS toolchain with binaries produced by the older tools? For example, has the C++ ABI changed? Can I safely expose a C++ interface in my headers or do I need to drop down to a C-based public interface?

    If C++ is ok, what idioms should I avoid in public headers that the older compiler won't like?

    My DLL will expressly avoid implementing a GUI, and  I'm avoiding the use of proprietary class frameworks, so (for example) I don't need to worry about mixing versions of MFC.
    Friday, March 3, 2006 11:29 PM

Answers

  • Of course I can't say for sure with an example but in geneal it is not advised to mix binaries compiled with different versions of VC Tools. That is not a supported scenario.

    Thanks,
    Ayman Shoukry
    VC++ Team
    Saturday, March 4, 2006 3:35 PM

All replies

  • Addendum: What about STL? Is it safe to pass STL types across the API, or do I need to hide the version 8 STL from the client? (I'd suspect the latter, assuming that the STL, like MFC, has changed drastically in implementation.)

    Right now I'm trying to determine whether to do my implementation with the older tools (which I find unstable) or acquire the new ones, and I need to know the drawbacks of the new tools.
    Friday, March 3, 2006 11:40 PM
  • Of course I can't say for sure with an example but in geneal it is not advised to mix binaries compiled with different versions of VC Tools. That is not a supported scenario.

    Thanks,
    Ayman Shoukry
    VC++ Team
    Saturday, March 4, 2006 3:35 PM
  • Does this mean that as a DLL library vendor I have to build separate libraries for users of each VC version? I have to ship both VC6 and VC8 DLL's? And I need to get DLL's from my vendors built both ways? That would prove to be a big headache trying to get the whole chain of suppliers to coordinate an upgrade.

    Which compiler is being used to build system DLL's? Is MS using VC6 to avoid breaking compatibility with older applications? Or is this only an issue for C++ bindings and there's no issue with C?
    Thursday, March 9, 2006 6:58 AM
  • The problem is the fact that mixing CRT models might cause problems because of breaking changes and hence even the advise of even when using the same version of the compiler, don't mix CRT models. I believe most of the current teams in Microsoft moved beyond VC6.0 (some of them already using VC2005).

    Thanks,
    Ayman Shoukry
    VC++ Team
    Thursday, March 9, 2006 2:51 PM
  • That's somewhat comforting. If I can hide my CRT from those above and below me in the DLL chain, I should be ok. Do the VC2005 tools allow that? (I know not to allocate a resource in one CRT and release it in another.) IIRC from reading other threads, VC2005 no longer allows static CRT linking, which would be one way to "bubble" it away from others in the DLL chain.

    I'm essentially developing a userspace driver, but I'm in turn using other vendors' userspace drivers and they in turn use yet another userspace driver to talk to a custom kernel Firewire driver. (There are issues with MS Firewire that won't be fixed until Vista.)
    Friday, March 10, 2006 1:22 AM