How to solve the problem:cannot open Debug/dm.exe for writing

This is a discussion on How to solve the problem:cannot open Debug/dm.exe for writing within the Windows Programming forums, part of the Platform Specific Boards category; When I compile the project,it also display:cannot open Debug/dm.exe for writing,but in the task manager I don't find the process ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    50

    How to solve the problem:cannot open Debug/dm.exe for writing

    When I compile the project,it also display:cannot open Debug/dm.exe for writing,but in the task manager I don't find the process dm.exe,so I cann't end the process.How to solve this problem?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    Does the file exist in that directory?
    Is it read-only perhaps?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I assume this is for MSVS. Close MSVS. If it won't close then go to Task Manager and view processes. End the devenv.exe process. Now open MSVS back up and it should compile. What happens in multi-threaded builds is one or more threads locks the exe file and never unlock it when they finish. This is a known bug in 2008 and although SP1 claimed to fix it I still ran into it frequently. I have not encountered this in MSVS 2010 so perhaps they actually fixed it in that version.

    In MSVS 2005 you could disable threaded builds which was handy b/c 2005 was the first to offer this and it was very buggy as well. I'm not sure if you can turn this off or limit the number of independent compiler threads in 2008.

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    50
    I use VC6,you mean it is bug?

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    VC6 should not have this problem since it does not support multi-threaded compilation and linking. Ensure the file is not marked read only. If you have submitted the exe to source control it will mark it as read-only. You shouldn't be submitting binaries to source control in the first place but thought I would mention it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. cannot open Debug/c.exe for writing
    By juice in forum Windows Programming
    Replies: 9
    Last Post: 01-06-2012, 10:48 AM
  2. Replies: 2
    Last Post: 07-25-2010, 11:45 AM
  3. Good practice of writing debug print statements
    By hzmonte in forum C Programming
    Replies: 11
    Last Post: 11-09-2005, 10:55 PM
  4. Cannot open debug/filename.exe for writing
    By Shadow12345 in forum C++ Programming
    Replies: 2
    Last Post: 08-26-2002, 10:44 AM
  5. Writing to the Debug window ~ VC++
    By Okiesmokie in forum C++ Programming
    Replies: 5
    Last Post: 05-10-2002, 08:50 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21