Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have just rebuilt the debug version of one of my applications and when I try to run it, it says MSVCRTD.dll is missing. I think this DLL is part of VC++ 6.0 which I did have on my PC a long time ago. The application was never compiled using VC++ 6.0 so I am not sure why it needs this DLL. I have seen suggestions that I should install the WDK to fix the problem, but I'm not sure if this is the best thing to do.

Why does my app need this DLL, I don't think any of the other DLLs I use need it?

Does anyone have any suggestions as to what is the best way forward?

Thanks

Tony
Posted
Comments
Jochen Arndt 30-Aug-13 10:40am    
Did you tried to run the app on another PC than the one used to build the app?

EDIT: Which DLL (with or without 'D': MSVCRT or MSVCRTD)?
[no name] 30-Aug-13 11:18am    
AFAIK The "D" is a debug DLL for the C++ runtime and debug DLLs are not distributed.
Richard MacCutchan 30-Aug-13 11:25am    
If you have just rebuilt it then you must have all the required development environment on your system, including these dlls. What did you use to do the rebuild?

Thanks for the reply.

The program works on my other PC (which has VC++6.0 installed) and the release version works on both PCs.

I understand that the D is debug and I don't wish to distribute the debug version. What I would like to do is RUN the debug version on my development PC which I can't do at the moment (only the release version will run which isn't a lot of use while developing)

Yes, as you say, I still have MSVCRTD.lib on my development PC so it links OK but the DLLs are not there. I think the LIBS and headers were left behind after I uninstalled either VC++ 6.0 or the WDK. I could re-install the WDK and might end up doing so but I would like to understand why this particular app needs MSVCRTD.dll while others which were developed in the same way do not.

I worry that if it is linking with MSVCRTD this might be an old DLL which might cause problems further down the line. I want to do the right thing, not just make it work - if you catch my drift!
 
Share this answer
 
I figured out what the problem was and thought I would put the solution here in case anyone else might find it useful.

I used the dependency walker to show exactly which part of my app was needing MSCVRTD.DLL and I found that it was required by one of my other DLLs. It turns out that although I checked to make sure my application was being built using up to date versions of my other DLLs, I had failed to realise that there was an old copy of one of my DLLs (built using VC++ 6.0) in the application's debug folder. Once I copied the up to date DLL into the app's debug folder, all was well.
 
Share this answer
 
Comments
H.Brydon 6-Sep-13 17:46pm    
Be careful about mixing debug and nodebug dlls within an image. The official answer from Microsoft is that you can't do it. In fact you can do it in some cases but it is unsupported. Notably, memory management is different between the 2 build types, and if you create an object with new() in the debug world and delete it with delete() in nodebug (or vice versa), you will trash your heap.

Bad juju.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900