Ask Your Question

Revision history [back]

Trouble with KNearest (OpenCV 3.1, Qt, MinGW)

I've built OpenCV via minGW, it's built correctly, everything was okay. When I created test project, it was okay too - building, compilation, work, everything was good. But when I tried to use KNearest model in my project, I've got building error - undefined reference to cv::ml::KNearest::create(). Of course, I included "ml.hpp" file That's how I created KNearest - cv::Ptr<cv::ml::KNearest> knn = cv::ml::KNearest::create(); Does somebody knows how to fix it?