0
votes

Computer: Windows 7 x64 bit, Visual Studio 2008

Downloaded the latest OpenCV build (2.3.3) from the SVN and compiled following these instructions (http://opencv.itseez.com/doc/tutorials/introduction/windows_install/windows_install.html#windows-installation) with the appropriate x86/x64 substitutions.

Everything compiled fine into what I'd except (just like the precompiled version I'm used to), but whenever I run any of my own programs, or any of the samples included in the /bin directory, I get the following error:

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

So I downloaded Dependency walker and found the following dependency errors:

  • MSVCP90.dll x86 (red)
  • MSVCR90.dll x86 (red)
  • TBB.dll x86 (red)
  • IESHIMS.dll (missing)

I'm not linking the correct word-size dlls on compile. The first two look like Visual Studio 9.0 runtimes and the last I hear is an Internet Explorer dll. I've already installed VS2008 x64 redistributable (do I need to recompile everything?), but it still doesn't work.

I've searched the internet and found this to be a common problem, but there's not really a common solution. For me this happens both with debug and release.

Any ideas? Thanks so much.

1
This happens when a 32-bit program finds a 64-bit DLL. Or the other way around. Dumpbin.exe /headers is the basic troubleshooter, look at "machine".Hans Passant
Yeah, I'm compiling a 64-bit program and the aforementioned dlls are 32-bit, i.e., not compatible, but the question is how to I a) find the right dlls (shouldn't they be in the VS2008 redist pack) and b) get my program to compile with the correct ones linked.Jason

1 Answers

2
votes

I figured out the problem. The TBB dlls that cmake linked when it generated my solution were the 32-bit binaries. I removed TBB from the solution and now I can run OpenCV applications...

If only I knew enough about cmake to rewrite it so it could direct the program to the correct ones.