Monday, 15 September 2014

.net - How can i call function from c++ console project in CLR c++ window form? -



.net - How can i call function from c++ console project in CLR c++ window form? -

i have 2 projects first c++ console application , sec c++ clr empty project .i want phone call function console , utilize in clr project .i tried create header file , include in clr project , utilize #include "headername.h" , phone call function render3d() gives me linking errors .

error 29 error lnk2028: unresolved token (0a000934) "void __cdecl render3d(void)" (?render3d@@$$fyaxxz) referenced in function "private: void __clrcall demo::mainform::addanimebutton_click(class system::object ^,class system::eventargs ^)" (?addanimebutton_click@mainform@demo@@$$fa$aamxp$aavobject@system@@p$aaveventargs@4@@z) e:\graduation project\cpp arena demo new design\demo\demo\mainform.obj demo

error 30 error lnk2019: unresolved external symbol "void __cdecl render3d(void)" (?render3d@@$$fyaxxz) referenced in function "private: void __clrcall demo::mainform::addanimebutton_click(class system::object ^,class system::eventargs ^)" (?addanimebutton_click@mainform@demo@@$$fa$aamxp$aavobject@system@@p$aaveventargs@4@@z) e:\graduation project\cpp arena demo new design\demo\demo\mainform.obj demo

error 31 error lnk1120: 2 unresolved externals e:\graduation project\cpp arena demo new design\demo\release\demo.exe demo

you have create library containing function want phone call , add together dependency between projects. visual studio solution contain 3 projects:

library render3d function console application references above library clr empty project references above library

.net visual-c++ visual-studio-2012 clr

No comments:

Post a Comment