Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to implement opencv face detection using C++/CLI wrapper and accessing it from C#. But i got following error.
Can anybody help me,please help!.

error LNK2005: "struct CvSeq * pFaceRectSeq" (?pFaceRectSeq@@3PAUCvSeq@@A) already defined in FaceDetcCliWrapper.obj
error LNK2005: "struct _IplImage * pInpImg" (?pInpImg@@3PAU_IplImage@@A) already defined in FaceDetcCliWrapper.obj
error LNK2005: "struct CvHaarClassifierCascade * pCascade" (?pCascade@@3PAUCvHaarClassifierCascade@@A) already defined in FaceDetcCliWrapper.obj
error LNK2005: "struct CvMemStorage * pStorage" (?pStorage@@3PAUCvMemStorage@@A) already defined in FaceDetcCliWrapper.obj
fatal error LNK1169: one or more multiply defined symbols found

I can able to run it as a win32 console application in Visual studio 10.
Posted
Updated 26-May-13 22:07pm
v2
Comments
Richard MacCutchan 27-May-13 4:09am    
You have duplicate definitions of the structures as listed in the error messages. Try and track down why; presumably because you have two versions of the same library or object file added in the linker options.

1 solution

Your header is misleading: at first it are linker errors. :-(

You have declared some structs and included them multiple time. To solve this problem you should write this statement at the top in every header file which class throws such an error

#pragma once
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900