1

I am using visual studio 2010 under Win7-64bit to build an application with openCV. I finished development and build the release version without error. I also successfully run the program in debug mode. I then move the .exe file to other directory in the same computer. I run it in cmd.exe and I got error warning: Error opening file <../../modules/highgui/src/cap_ffmpeg_implhpp:537>

I guess there are some dependence with some libraries of openCV but I don't how to solve it. My final task is that I can use that .exe in another computer under Win7 directly. How to do it?

I found a similar question here. But I don't have .dll file built, so what should I do to solve this problem?

Community
  • 1
  • 1
sflee
  • 1,659
  • 5
  • 32
  • 63

1 Answers1

4

Building an OpenCV app with shared libs (DLLs) require the DLLs to be available (same folder or in lookup path) to the exe when it is run.

If you are using static linking then you don't need any of the OpenCV DLLs to be reachable. However, due to licensing issues, ffmpeg is linked dynamically even when the rest of the libs are linked statically, and thus, you need to have the ffmpeg DLL available for the exe. It is called something like opencv_ffmpeg*.dll.

Note that this is only needed if you are using highgui related functionality.

Adi Shavit
  • 16,743
  • 5
  • 67
  • 137