problem integrating unmanaged C/C++ with C#
-
hi forum, I want to integrate an old C application with a C# library (dll). I know there are various alternatives but i have choosen the "managed C++ extensions" way. What i do is to modify the compiler options by adding the /clr option and to recompile the old C application... but the compilation returns this error: Command line error D2016 : '/YXstdafx.h' and '/clr' command-line options are incompatible do u know what is the problem and its solution? I am using Visual Studio .NET 2002 (.NET Framework 1.0) Thanks in advance! Sergio.
-
hi forum, I want to integrate an old C application with a C# library (dll). I know there are various alternatives but i have choosen the "managed C++ extensions" way. What i do is to modify the compiler options by adding the /clr option and to recompile the old C application... but the compilation returns this error: Command line error D2016 : '/YXstdafx.h' and '/clr' command-line options are incompatible do u know what is the problem and its solution? I am using Visual Studio .NET 2002 (.NET Framework 1.0) Thanks in advance! Sergio.
hi, I have solved the problem by setting the "Not Using Precompiled Headers" option, but now i have got another problem: I dont know how to use the imported C# dll. What i do is to copy the c# dll in the "debug" folder. Then, I set the path of the "debug" folder in the "resolve #using reference" project property and finally, I import in the C++ program the C# dll by using the #using directive: #usign "MyDLL.dll" But now, how can I create an object contained in the DLL? Thanks a lot!! Sergio.
-
hi, I have solved the problem by setting the "Not Using Precompiled Headers" option, but now i have got another problem: I dont know how to use the imported C# dll. What i do is to copy the c# dll in the "debug" folder. Then, I set the path of the "debug" folder in the "resolve #using reference" project property and finally, I import in the C++ program the C# dll by using the #using directive: #usign "MyDLL.dll" But now, how can I create an object contained in the DLL? Thanks a lot!! Sergio.
Your question belongs in the C++ Forum, not C#. If your trying to use the C# .DLL in Mnaged C++, it's a question for the Managed C++ Forum. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome