In the past we experienced some problems using a DLL library created with Visual Studio 2005 in our Visual Studio 6.0 application (VS2005 DLL was C++ unmanaged, of course). In your opinion can we fall in the same kind of problem if the library is static (*.lib) and not dynamic?
3 回答
It seems like the problem area would be the runtime libraries -- if the VS2005 DLL is using the DLL versions of the runtime libraries, then you would need both sets of runtimes installed when the application is installed. If your VS2005 DLL is statically linked to the VS2005 runtime, then it should be OK.
Microsoft recommends that unmanaged DLLs must be compiled with the same CRT / STL as the main application. And the main application and the DLL should be using dynamic linking with the CRT.
If the DLL implements a pure C-interface or a COM-interface, then it should be possible use DLLs from another version of Visual Studio. But if the DLL doesn't use static linking of the CRT, then it will require that the CRT-dlls are available.
It depends on what kind of problems of course. There are some conflicts that are more likely to occur in DLLs and some that are more likely to occur in static libs. If you are building against the same version of the Microsoft SDK it will minimize the problems.