{"id":370,"date":"2022-08-30T15:00:13","date_gmt":"2022-08-30T15:00:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/06\/opencv-compile-error-undefined-reference-to-cvcreateeigenfacerecognizerint-double-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:00:13","modified_gmt":"2022-08-30T15:00:13","slug":"opencv-compile-error-undefined-reference-to-cvcreateeigenfacerecognizerint-double-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/opencv-compile-error-undefined-reference-to-cvcreateeigenfacerecognizerint-double-collection-of-common-programming-errors\/","title":{"rendered":"OpenCV compile error undefined reference to `cv::createEigenFaceRecognizer(int, double)&#39;-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve been trying to figure this out for three days, but I&#8217;m quite new to C++ and I seem to have hit a wall.<\/p>\n<p>I want to change one of the opencv source files, particularly the eigenfaces function written by bytefish. I want to have it return many faces instead of one. I believe I figured this part out.<\/p>\n<p>The problem is that, when I recompile opencv, no matter what dll I use, when compiling the demo facial recognition code, I get a couple errors:<\/p>\n<pre><code>SET: IncDir = C:\\opencv\\build\\include\n$(INCDIR) = C:\\opencv\\build\\include\nSET: LibDir = C:\\opencv\\build\\x86\\mingw\\lib\n$(LIBDIR) = C:\\opencv\\build\\x86\\mingw\\lib\ng++ -I\"C:\\opencv\\build\\include\" -L\"C:\\opencv\\build\\x86\\mingw\\lib\"     facerec_eigenfaces.cpp -lopencv_calib3d243  -lopencv_contrib243 -lopencv_core243     -lopencv_features2d243 -lopencv_flann243 -lopencv_gpu243 -lopencv_highgui243 -lopencv_imgproc243 -lopencv_legacy243 -lopencv_ml243 -lopencv_nonfree243 -lopencv_objdetect243 -lopencv_photo243 -lopencv_stitching243 -lopencv_video243 -lopencv_videostab243 -o facerec_eigenfaces\nProcess started &gt;&gt;&gt;\nC:\\Users\\Nate\\AppData\\Local\\Temp\\ccDRRGhr.o:facerec_eigenfaces.cpp:(.text+0x8a0):     undefined reference to `cv::createEigenFaceRecognizer(int, double)'\nC:\\Users\\Nate\\AppData\\Local\\Temp\\ccDRRGhr.o:facerec_eigenfaces.cpp:(.text+0xdf5): undefined reference to `cv::applyColorMap(cv::_InputArray const&amp;, cv::_OutputArray const&amp;, int)'\ncollect2: ld returned 1 exit status<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-06 03:30:53. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been trying to figure this out for three days, but I&#8217;m quite new to C++ and I seem to have hit a wall. I want to change one of the opencv source files, particularly the eigenfaces function written by bytefish. I want to have it return many faces instead of one. I believe I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-370","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=370"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/370\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}