MistyD
MistyD

Reputation: 17253

Debug version runs but release gives 0xc000007b - missing dlls?

When running my Visual Studio C++ application debug version through VS2010 by Project Only > ProjectName the generated exe runs well. However when I generate a release version and go to the folder where the exe is created I get the following error:

The application was unable to start correctly (0xc000007b). Click Ok to close the application

The files in the folder is only the exe file whereas my project uses various boost libraries. Is it possible that its giving this message because of the missing boost dlls ? Is there a way to make the compiler paste all the necessary dlls in the exe folder.

Is there any way to launch the release version from VS2010 like we have for the debug version as in Debug >> Start new instance

Upvotes: 1

Views: 3997

Answers (1)

IdeaHat
IdeaHat

Reputation: 7881

I hate when that happens. It could be the fact that its missing the bloost DLL's: the easiest way to fix this is to add the folder to the Path environment variable. Sadly enough, we don't have enough information from your post to confirm that this is the problem. Common other problems include: you are linking to libraries that were built for a different architecture/are using a different runtime library, you are missing other 3rd party dlls, the .lib file you used in the linker is pointing to a different version of the code than the dll you are pointing to...the list goes on.

As for copying the dlls at runtime, you can do this using the custom build events [http://msdn.microsoft.com/en-us/library/e85wte0k%28v=vs.80%29.aspx]. Just write a batch script that copies the dlls as a "Post Build Event" and you should be good to go, but I'd suggest the Path way first.

Upvotes: 1

Related Questions