0
votes

I have a dll abc.dll.but when I open it in dependency walker,I depends on the MSVCR90.dll. I want to set the property of the project such type it should be independent of that dll. How it is possible.I am using vs2008.

1
The C++ runtime is a hard dependency and cannot be removed. However, you can link statically to the CRT libraries (with some caveats). See stackoverflow.com/questions/3230/….Frédéric Hamidi
Giving each DLL and the EXE its own copy of the CRT is almost never not a problem. Don't do this unless you know exactly what the ramifications are.Hans Passant

1 Answers

2
votes

Statically link to the CRT (/MT). That will remove the msvcr90.dll dependency (by basically including the CRT inside your dll). Note that if your dll uses other dlls, their dependencies might drag msvcr90.dll and friends in after all. In such cases, you'd better off using dynamic linking.