Ask Your Question

Revision history [back]

3.10 ml::EM linker error

When I uncomment the second line here I get an error LNK2019, but it works with the first line in there. I have not had this issue before with opencv (although I haven't used anything from the ml library before). In my linker inputs I have opencv_wrold310.lib

Is there some other file I need to add to my linker? or am I just not calling setClustersNumber correctly?

    ml::EM * test=ml::EM::create();

   //test->ml::EM::setClustersNumber(9);

full error:

Error LNK2019 unresolved external symbol "public: virtual void __cdecl cv::ml::EM::setClustersNumber(int)" (?setClustersNumber@EM@ml@cv@@UEAAXH@Z) referenced in function "class cv::Mat __cdecl gmm(class cv::Mat,class cv::Mat,class cv::Mat,int)" (?gmm@@YA?AVMat@cv@@V12@00H@Z) ConsoleApplication1 C:\Users\Traz\Documents\Visual Studio 2015\Projects\ConsoleApplication1\ConsoleApplication1\Source.obj

Using VS2015