Re: msvcr71.dll and msvcr80.dll conflict?
pyramus wrote:
I am developing a C++ class library which will be released as a set of
DLLs. I currently build these DLLs under VC7.1 with the Multi-threaded
DLL (/MD) option. I understand that this requires msvcr71.dll and
msvcp71.dll be redistributed in the same directory with my DLLs.
It requires them to be available on the target machine, you don't have to
distribute them yourself.
Now, let's say a client running VC8.0 wants to link to my DLLs. Since I
used the /MD option, the client also needs to use the /MD option, and
therefore the application will depend on msvcr80.dll & msvcp80.dll.
Doesn't work. Generally, you can't mix the output of different C++ compilers
and that includes major releases. That's why people put a tag in their DLL
names to distinguish between different compilers and possibly settings like
debug/release and Unicode/ANSI. For you it means that you have to
distribute one set of DLLs/LIBs for each compiler you want to support.
You can automate much of the difficulties for the client using #pragma
comment(lib, ..), so the correct lib is automatically selected.
Uli