I started the tutorial for opencv 2.4.7 on Win8, latest MinGW, and Eclipse Kepler R1, CDT. C++ Compiler includes are referencing to [path-to-opencv]open247uildinclude.
in the MinGW C++ Linker I add the library path [path-to-opencv]open247uildx64vc11lib. The vc11 directory contains libraries for VisualStudio from what I've read. Is that still okay to compile them with MinGW?
I added the core and highgui library for this sample (I don't think we need more than those).
However, for this simple idle code below, I provoke the following compilation error.
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
using namespace std;
int main(){
Mat image;
}
The error on compilation is:
Description Resource Path Location Type
undefined reference to `cv::fastFree(void*)' FirstOpenCV line 278, external location: C:UsersJohnDocumentsSoftwareopencv247uildincludeopencv2coremat.hpp C/C++ Problem
What's the reason for this?
If I add
namedWindow("testWindow", 1);
I even get this error
Description Resource Path Location Type
undefined reference to `cv::namedWindow(std::string const&, int)' main.cpp /FirstOpenCV/src line 23 C/C++ Problem
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…