c# - Adding includes in my CLR project gives WLR cannot be compiled with /clr enabled -
// main dll file. #include "stdafx.h" #include "tga2dcli.h" //#include <game.h> #include <windows.h> tga2dcli::tga2dgame::tga2dgame() { //mygame = new cgame(); } void tga2dcli::tga2dgame::init(system::string ^ aversion, system::intptr ahwnd) { hwnd convertedhwnd = reinterpret_cast<hwnd>(ahwnd.toint64()); //mygame->init(l"", convertedhwnd); } when #include <game.h> not commented out cause error c1189 #error: wrl cannot compiled /clr option enabled
i'm trying create windows form (c#) shows game engine running in picturebox game engine in c++, code snippit c++/clr project in solution.
my issue don't understand wrl error? not understand how running. , need game include init engine running in windows form.
the windows runtime c++ template library (wrl) not compatible c++/cli.
compiling using wrl requires /zw option. , language extension incompatible /clr required use .net.
wrl in nearer com .net.
Comments
Post a Comment