Vorac
Vorac

Reputation: 9114

Problems linking to OpenCV from MinGW

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.

Upvotes: 0

Views: 639

Answers (1)

berak
berak

Reputation: 39796

  • "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..)

Upvotes: 1

Related Questions