views:

129

answers:

3

I'm developing an SDK, and we have clients that are still coding with VC++ 6, while others use Visual Studio 2005 and others with 2008.

Currently, we build several flavors of our SDK, where we build the exact same source code with each of those compilers. I want to find out if that is really necessary. Is it safe to build our SDK (which takes the form of DLLs) with VS2008 and expect our clients who use VC++ 6 to be able to use it without problems?

+2  A: 

Depends. Does your DLL depend on the VC runtime, MFC or ATL? If so, your clients will have to distribute those dlls. Does your dll export C++ structs/classes/functions? There is no standardized ABI for C++, so they may or may not work with other compilers. If your dll only exports extern "C" {} style, you'll be fine.

Roel
A: 

It is pretty safe if you'll not allow client's program to delete memory that was allocated in your SDK. And vice versa.

Kirill V. Lyadvinsky
A: 

If the DLL has a pure C API, your executable will never release any resource allocated by the DLL (and vice versa), then it should work.

sbi