0
votes

I am using OpenCV 3.1 for Windows, MinGW, NetBeans.

According to this there should be just one OpenCV library that integrates multitude of other ones:

OpenCV 3.x only contains one lib - opencv_world.lib?

I am trying to use the pre-built libraries:

http://docs.opencv.org/3.0-beta/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariable

Linking:

g++ -o dist/Release/MinGW-Windows/program_name build/Release/MinGW-Windows/main.o -L../../../lib/opencv/build/x64/vc14/lib -lopencv_world310

And I am getting a lot of errors like this:

build/Release/MinGW-Windows/main.o:main.cpp:(.text+0x18b): undefined reference to `cv::imread(cv::String const&, int)'
build/Release/MinGW-Windows/main.o:main.cpp:(.text+0x1a0): undefined reference to `cv::String::deallocate()'

Something I would expect after not including opencv_core and such - but as I understand they all should be in opencv_world310 now.

How to solve this problem?

1
you need to build with cmake before using ....after build you will find all the libs & dlls ...original source do not contain pre-built libraries like earlier versionMD. Nazmul Kibria

1 Answers

2
votes

You are using OpenCV built with vc14 (Visual Studio 2015) compiler:

L../../../lib/opencv/build/x64/vc14/lib

You need to rebuild OpenCV with MinGW, and link to it.