Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Issue to link c++ opencv project with c# console app.

What I have tried:

I try to develop a wrapper to link a library of c++ class of image processing methods to a c# console project. In the c++ console app one I've create a class with the opencv include in its header
C++
#include "opencv2/opencv.hoo"
all right. When I add an other class and include the library in the header
C++
#include "opencv2/opencv.hoo"
and try to build my wrapper I obtain this error:
error LNK2005: "public: __cdecl cv::MatSize::MatSize(int *)" (??0MatSize@cv@@QEAA@PEAH@Z) giÓ definito in PrototipoInterazioneCore_2.lib(opencv_world412d.dll)

Anyone know the origin of this issue? Sorry, I'm new to CLR and Class Libraries building.

Thanks.
Posted
Comments
Richard MacCutchan 5-Dec-19 12:28pm    
OK, figured it. You have included two modules that both contain a definition of cv::MatSize::MatSize(int *). Remove the duplicate file.

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