Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ application fails to start correctly (0xc000000d)

I'm writing a C++ application using VS2010 on two dev computers - both are Win7 64bit SP1. I use git to sync the repositories.

On one of the machines the compiled executable (and also the test exec) stopped working with the following error, while on the other machine it works fine and I'm able to continue development.

The application was unable to start correctly (0xc000000d). Click OK to close the application.

I tried deleting the repository and cloning it again. I also made sure I have the same versions of Boost, git, Visual Studio. Also, I tried debugging (stepping in) but the error occurs before any line of code is reached.

Notice as far as I understand I'm tracking Visual Studio's solution\project configuration files as detailed here.

I'm at a loss, how would you debug this?

UPDATE 1: Only the Debug version fails to run. The Release version runs fine

UPDATE 2: The executable that doesn't work does work on the other computer!

UPDATE 3: I've reinstalled VS2010 (exactly the same version) - didn't help. Surprisingly the compiled files are not the same size between the two machines.

like image 976
Jonathan Livni Avatar asked Apr 13 '11 11:04

Jonathan Livni


2 Answers

I got the same problem as you mentioned. My solution:

  1. Clean the manifest file and rebuild
  2. In the property page-> Manifest tool -> make sure "Additional Options" is set to nothing. (I set it as "/validate_manifest" before).

Or you can try "Embed Manifest -> NO", rebuild and then set back to Yes. It sounds to be ridiculous, but it really works sometimes. I don't know why.

like image 67
Steve Avatar answered Sep 24 '22 20:09

Steve


I got the same phenomenon suddenly without a warning on Win7 / VS2010 / C++. Debug App couldn't be launched, got 0xC000000D at initializing and loading multiple dlls. Found one base dll of my own responsible, played around with linker settings. Modifying settings, incremential rebuild -> app starts, rebuild all -> app crashes again. After setting "generate manifest" to "no" in the linker settings the sample app works, but the main app still crashes. After setting "generate manifest" to "no" for the most of my dlls -> the app starts in debug mode again. The stuff is very spurious, because some dlls need the modified settings others do not.

like image 41
Martin Seck Avatar answered Sep 22 '22 20:09

Martin Seck