Two days ago I was working on a C++ project using OpenCV, when suddenly my project couldn’t run anymore!
I just have changed my OpenCV dlls to parallel version and ended up with this Error: "The application was unable to start correctly (0xc000007b). Click OK to close the application." every time I tried to run my application.
After some hours of hard search I found that 0xc000007b error didn’t come from an exception in my code or even OpenCV dlls. I found that the error is just wrong configurations and the solution is easy, so I decided to write this article to show you how you cans solve this error permanently.
The Problem
0xc000007b error comes mainly from mixing up 32bit environment with 64bit one, that is you have an 32bit application that tries to load a 64bit dll.
To see exactly who cause this you must examine your application dependencies carefully.
I used a free portable program to do this: "Dependency Walker". After you download it you can open any PE file (exe, dll, …)
Open your application executable file (in my case "testopencv.exe") with dependency walker, you sould see something like this:
As You can see, dependency walker shows all dlls my application depends on, and all dlls these dlls depends on and so on…
Now you must check these dlls to see which one is 64 bit? If your application works fine you should see nothing, but when your application throws 0xc000007b error that means you have at least one 64 bit dll in these dlls.
In my case as you see, my application depends on cv2010d.dll which depends on tbb_debug.dll which is 64bit dll (notice the 64 number near its icon). You can see the properties of any dll to find its path, my tbb_debug.dll lies on: "E:\Intel\Compiler\11.154\tbb\intel64\vc9\bin".
The Solution
But why cv2010d.dll links to 64bit version of tbb_debug.dll instead of 32bit one? and how can we change that?
The answer is that most exe or dll have it is dependencies names only not their paths (that is what we called dynamic linking). So finding the real path of these dependencies done in runtime, and in our case that cause the problem.
When I run my application it tries to load cv2010d.dll which tries to load all of its dependencies including tbb_debug.dll. System tries to find tbb_debug.dll 32bit (because my application is 32bit) but when it can’t it tries to find 64bit version and it can, so it tries to load it and here is the error comes from.
To solve this I remove "E:\Intel\Compiler\11.154\tbb\intel64\vc9\bin" from the PATH variable, so when I tries to run my application system can’t find any tbb_debug.dll (neither 32bit nor 64bit version) so it throws a new error now says that tbb_debug.dll is not found.
The last step I made was coping the 32bit version of tbb_debug.dll and but it near my application executable file so now when system tries to load tbb_debug.dll it will find the 32bit version of it (also dependency walker will do that so there isn’t any 64bit dll in my dependencies now) and my application comes back to life again.

2010/09/26 at 4:41 PM
0xc000007b error
Download and install the following to fix 0xc000007b error.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
2010/09/26 at 5:34 PM
I don’t think it is enough. When error 0xc000007b occurred on my pc, “Microsoft Visual C++ 2005 Redistributable” & “Microsoft Visual C++ 2008 Redistributable” were already installed.
I am sure that you must have a version of Microsoft Visual C++ Redistributable installed on your pc, to solve 0xc000007b error but that is not enough.
2010/10/19 at 2:47 PM
Dan solution worked for me
Thank you
2011/01/16 at 10:08 PM
i did what it said and there are no 64bit ddls
but when i try to open my file it starts but says
‘supermeatboy.exe has stopped working’
can you help?
2011/06/28 at 8:13 PM
[...] you get the 0xc000007b crash when you run your application on another computer, then you just need to distribute the [...]
2011/07/05 at 5:20 PM
thank’s dude it’s work, very thank you
regards
oki
2011/08/04 at 5:12 AM
I tried to use “Dependency Walker”, i see on left panel … there’s no 64 bit warning, but i still got those error
pls replied me …. thx Dan
2011/08/18 at 4:43 AM
umm where is the path variable
2011/09/11 at 9:10 PM
Perfect!
Just adding, if the error persists, even after putting the .dll in the correct version, then it may be an error code. eg: use imread() of the wrong way, err on the filename.
2011/09/25 at 6:33 AM
[...] http://msoos.wordpress.com/2010/09/11/0xc000007b-error-solution/ Like this:LikeBe the first to like this post. [...]
2011/09/25 at 6:38 AM
Very nice!
Thanks!
2011/10/14 at 11:15 AM
Thanks helped me. I was build my application in x64 (Any CPU), just change it to x86 and works like a charm, THANKS!
2011/10/18 at 4:34 PM
To me something similar happens, but I think directx’s fault, since the simulator and installed no problem but when you are installing the direcx I get this error:
Your computer does not have the d3dx9_43.dll, try reinstalling the application.
No application refers to, I uninstalled the a-10 and I’ve reinstalled a few times, but always I get the same.
Can anyone tell me how I can fix it?
Incidentally this happens to me since I format the computer.
My team is:
Windows 7
4Gb Ram
1TB HD
2011/11/15 at 6:08 PM
very thx it was helpful
2011/11/24 at 12:31 PM
THANK YOU! I was getting insane about this… copying the .dll in directorie, works for me
2011/11/25 at 7:46 PM
My gpsvc file is running on a x64, however, I cannot delete it or modify it or anything! any help?
2011/12/19 at 3:35 AM
i having this same problem but is during windows start up meaning when i log in, my screen is black and i cant see anything.
Any solution for my problem?
2011/12/19 at 3:44 AM
at the same time, all my other function is not working meaning all hiving me the error 0xc000007b thus giving no control of anything in my computer. the task manager and the safe mode is also having the same problem
2011/12/23 at 9:22 AM
Dan,site not opening
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
2011/12/25 at 9:22 PM
i really dont know much about computers..i tried to install halo 2 and first it said d3dx9_31.dll is missing..i found the dll and pasted it in the applications folder..then it gave the0xc000007b error..it dosent even begin installation..i tried to run it in compatibility mode also but the same results..pls help..
2012/01/09 at 8:49 AM
Thanks Dan, Work For Me
2012/01/20 at 6:04 PM
I get the 0xc000007b Error when I try to start up Fable- the lost chapters, on my windows 7, 64 bit computer.
I got the Dependency walker, and it showed some missing dlls, and I put those in, then it showed some different bits, x86 and x64
The problem I am having, is that the above OP reads that there is an error solution, and I read it again and again, and cannot see any solution in there. There is a description of what happened and what it means in the “solution” but not how to actually change the dll bits or whatever needs to be done.
Maybe it is that I am not computer programmer, minded, where changing data is not easy for me, maybe it is in code.
Maybe someone could dumb it down for me.
2012/01/21 at 3:02 PM
In my “solution” I didn’t change “dll bits”. 0xc000007b error occurred because of loading the wrong dll version. What I did is just force the exe to load the 32bit version of dll instead of 64bit version, that is all.
2012/01/21 at 3:21 PM
Thanks for replying!
I didn’t even know if changing dll bits is something that can even be done. I was just trying to sound informed. But what I need to do is force the exe to load 64bit versions on some files that are loading 86bit versions, or so it seems from the dependency walker.
I don’t know how to do what you said you did. And if I have so many 86bits and so many 64bits, do I need to find 64bit versions of the 86bit versions, or is there a way to just convert them?
2012/01/21 at 4:26 PM
Yes you need to force your exe to load one kind of dlls (if your exe is 64bit then it should load 64bit dlls) and you can’t convert 32bit to 64bit or via-verse you should download or find a new dll from the souce you get the first one.
The easy way to force the exe to load your dlls is to put them all at the same directory with it and make sure that there is not any other versions of these dlls that your exe can access using the PATH system variable folders.
2012/01/22 at 5:37 PM
Thanks for your blog! I didnt read all the details, but thanks to this entry I started examining the problem with DependencyWalker. Maybe this helps someone else:
As I did not copy the correct 32-bit dll to the location of the .exe file created by my project, It loaded the dll from c:\program files\intel-wireless-driver. As I’m using a 64bit os this dll was 64bit, while my application is 32bit. So, copying the 32bit dll to the same dir where my .exe is, solved the problem.
2012/01/22 at 7:41 PM
Thank you for sharing your experiment, maybe it will help someone else
2012/02/03 at 5:05 PM
thank you very much
have good works
2012/02/03 at 6:52 PM
You are a hero!
2012/02/05 at 4:29 PM
It didn’t work for me Dan. I’m still getting the error
I don’t know how it’s working for other people.