I am trying to call C# DLL in native C++ through C++ CLI. I have prepared C++ CLI conversion functions to convert native C++ variables to C# Compatible variables. i.e. Const Char * to System:String^. My code works fine under Visual C++ --> CLR Console Application but when I tried the same code in Visual C++ --> Native C++ Console it breaks with subjected error. fatal error C1001: An internal error has occurred in the compiler. in gcroot.h line 112
Although I have enabled CLR Support option in Project --> Properties and Also added pch.h Header and pch.cpp source files in the native C++ Console app. Do I need any other settings as well to enable CLR mode?
How I can call C# dll in native C++ application?
My C# DLL function is having below definition
public static double CalculateProp(string PP, double t, double pr, string[] Vc, double[] vecmol, string outProp)
I have defined CLI Function with below defination
double CalculateProperty(const char* s, double t, double p, const char * att[],double Z2[], const char * op)
which is called by native C++.
Please let me know if any thing I missed out in syntax or require any further debugging information. Thanks in advance.