I'm making a student project called "C++ Game Development". It's a card game with client and server. Client application contains few windows which I've already made with Windows Forms in Visual Studio 2013. For client/server communication I decided to use Internet Communications Engine (ICE). During Build in client's project I had errors in auto-generated code by ICE. I found that ICE doesn't support C++/CLI, only native C++ or C# (that I can't use).
So now I am at a crossroads, whether make the whole client application in native C++ (that means for ex. use MFC which I'm not familiar with) or use both native C++ and C++/CLI (put the work I've done with Windows Forms to CLR Class Library and link to it from native C++ project with entry point) which is also not trivial.
I'm trying to choose the less time-consuming option. I'm asking to help me estimate the complexity of these approaches. I like the second much more but I'm not sure it's the easiest.
C++/CLI can use native C++ code just fine.
Stick the generated code into a "static library project" that builds without /clr
. Then list that static library as a dependency of your C++/CLI DLL.
The linker will figure out the rest. The result is called a "mixed-mode assembly".
Note that your comm library may not accept managed types. That's ok, C++/CLI can perfectly well mix unmanaged data model and managed view (UI) classes.