C++ and C# integrate

  • Thread starter Thread starter alep82
  • Start date Start date
A

alep82

What are the way to utilize C++ and C# language in the same project in
Visual Studio ?


Thanks
 
In the same project in Visual Studio? You can't. A project can target
only one language (as you need to run a compiler against it and all the code
items have to be able to be recognized by the one compiler).

Now, you can compile C++ code and C# code into the same ^assembly^, but
you would have to more than likely use the command line compilers to do
this. You would have two projects, one C#, and one C++, and then compile to
netmodules. Then, you would use al.exe (the assembly linker) to compile the
modules into an assembly.

Of course, you can have a C# project and a C++ project in the same
^solution^ and have your C++ code create managed assemblies, which you
access in your C# project, or vice versa.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top