Ask Your Question
0

Problems with class cv::FaceRecognizer under Windows 7 64 bit and VS2010

asked 2012-07-07 15:00:47 -0500

allissaid gravatar image

Hallo,

I am looking forward to compile the facerecognition in videos with openCV but I can't.

I get this error message in my compiler (VS2010):

1>FaceReconizer.obj : error LNK2019: unresolved external symbol "class cv::Ptr<class cv::facerecognizer=""> __cdecl cv::createFisherFaceRecognizer(int)" (? createFisherFaceRecognizer@cv@@YA?AV?$Ptr@VFaceRecognizer@cv@@@1@H@Z) referenced in function main

1>c:\users\nilmb\documents\visual studio 2010\Projects\FaceReconizer\x64\Debug\FaceReconizer.exe : fatal error LNK1120: 1 unresolved externals

Yes, is a linker error. As far as I know I have everything correctly linked in VS2010 since I can perfectly run a program capturing frames from my webcam and showing the video using the opencv functions.

As I said I am running everything under Windows 7 64 bits and OpenCV 2.4.2.

Do you have any idea about how to fix this?

Thanks so much for your help in advance,

Nil

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2012-07-07 16:10:38 -0500

allissaid gravatar image

Ok. Its solved!

The cv::FaceRecognizer is in the opencv_contrib242.lib module, which I didn't link.

Thanks everyone anyway!

Nil

edit flag offensive delete link more
0

answered 2012-07-18 12:08:19 -0500

J.B. gravatar image

Hi Nil, could you write exactly what code line you added ? I just can't figure out what to write - what is the path of this module "opencv/contrib/...." or something like that? thanks j.b.

edit flag offensive delete link more

Comments

1

For Visual Studio you'll need to add opencv_contrib242.lib under: Configuration Properties → Linker → Input. Probably the tutorial I wrote for OpenCV 2.3.1 and libfacerec helps you: http://bytefish.de/blog/opencvvisualstudioandlibfacerec.

Philipp Wagner gravatar imagePhilipp Wagner ( 2012-07-18 12:34:28 -0500 )edit

Hi J.B. Sorry for the late answer.

This is the line I added in Configuration properties>C/C++>Linker>Input and then in additional dependencies: "C:\OpenCV2.4\build\x64\vc10\lib\opencv_contrib242.lib"

Careful with the x64, you may be working under x86.

Hope it helps :)

allissaid gravatar imageallissaid ( 2012-07-18 16:20:54 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-07-07 15:00:47 -0500

Seen: 959 times

Last updated: Jul 18 '12