简体   繁体   中英

Application cannot Start: OpenCV x64 compilation in VS uses x86 libraries

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM