0

I would like to start a small project, that uses OpenCV. My target is a Windows 7 machine, so I am trying to generate native Windows binaries with MinGW. The simple source compiles and works fine with gcc on my Fedora 19 installation. However, under Windows here are my problems.

I tried invoking g++ from the command line, tried a simple makefile and lastly, tied this tutorial. The problem is one ant the same.

enter image description here

I believe those are Visual Studio builds. The guy from the tutorial has a mingw folder in place of vc12 folders. Inside these folders there are libraries of the sort of opencv_imgproc249d.lib, but when I link against them, no symbols get resolved, everything is "undefined reference".

I would like not to use Visul Studio for a variety of reasons. However, I would absolutely not want to build the library myself, knowing what dependency hell lurks underneath.

Any tips how to fix this issue? My target goal is be able to link against a readily downloaded opencv build with a gnu makefile.

Community
  • 1
  • 1
Vorac
  • 8,726
  • 11
  • 58
  • 101

1 Answers1

1
  • "My target goal is be able to link against a readily downloaded opencv build with a gnu makefile"

    sadly there are no more prebuild mingw libs, and no, you can't use the vs libs with mingw, so the 1st step would be to invoke cmake and build the opencv libs from src.

  • "I would absolutely not want to build the library myself"

    ah don't be too afraid of it, just give it a quick try.

    unlike on linux, there are no further dependancies on windows for common opencv. (sure, you need java and ant to build the java wrappers, python - if you wanted that, etc..)

berak
  • 39,159
  • 9
  • 91
  • 89
  • 1
    Thanks a lot. Accept and upvote for the direct and very fast answer. I remember on Linux installing tens of tools, then building `ffmpeg`, then building OpenCV with wrong configuration, then ... after 2 full days it worked. – Vorac Jun 09 '14 at 10:31
  • Still, it is ridiculous to have to manually build opencv (gigabytes!?). I just spent the whole day on it, in vain so far: win7, opencv 2.3.1, 2.4.10 or 2.4.9, etc whatever they just fail to build. Having binaries would let people use opencv, not wasting time on trying to build it (and on linux you just apt-get them, period). – MoonCactus Oct 30 '14 at 23:17