Importing C++ Express project to C# express?

Hi,

I am new here and I am wondering if it is possible to import C++ express project into C# express ...

Best Regards,

Johney



Answer this question

Importing C++ Express project to C# express?

  • paddyO

    Please define "import."

    Do you mean have a C++ project sitting along side a C# project as one can do in the higher versions of Visual Studio No... that is one of the limitations of the Express Editions... single language per IDE, even if multiple ones are installed.

    Do you mean port the C++ code to C# If so... be prepared for an awful big headache unless your code is managed C++ code from the start.



  • Phonics3k

    Johney,

    Brendan has done a great job explaining this, but I can't help wonder what your trying to do. Do you have an existing C++ project that you'd like to make changes to Are you looking to consume the functionality that's in the C++ code, but from C# There are a number of options for interop, and of course, if it's just updating the C++ code you could always simply use C++ Express.

    -Anson



  • KIPREAL

    Hi Anson,

    Actually, I am just trying to port my codes over to C++.. but wondering if there is an easy way to do it...

    Best Regards,

    Johney


  • Jun_1111

    Hi Brendan,

    I see there is no way to import and export C++ to and from C#, hope they could implement it...

    Also, what do you mean by managed code ...

    Best Regards,

    Johney


  • Ken Villines

    Johney,

    I'm still not 100% sure we're talking about the same thing, but I think you're asking if it's possible to take an existing C++ file and have it converted into the equivelant C# code (in the same way its possible to take some forms of VB6 applications and migrate them to VB.NET through a wizard). Neither C# Express, nor the enterprise version of VS, support this scenario. In general it would be possible to use the functionality of the C++ code by building it into a managed .dll, using either C++/CLI or exposing native entry points (_dllexport) that could be called (or, perhaps, exposing it as a COM object). A tool that converts from C++ to C# may be possible to write for some subset of the language; unfortunately that's rarely where the complexity comes in. The frameworks that C++ uses, ATL, STL, MFC, and the larger template libraries like Boost would be the real sticky points (not to mention the additional tools that C++ uses, like MIDL). I don't know of any tool that attempts to do this, but depending on the size of the project (if it's small), it may not be too bad to convert 'by hand'.

    -Anson



  • Mike!

    In short... Managed Code is where a program or other code is not executed directly by a computer’s processor (as most applications are) but instead executed within the context of a virtual machine or other code that acts as an intermediary between the application and the overall environment (memory, cpu, etc).

    .NET is a platform for building applications in Managed Code, although the term isn’t used as much in languages such as C# or VB.NET as there really isn’t an unmanaged version of either... C++ on the other hand you can build native (unmanaged) applications, unmanaged applications that can use methods/classes within the framework, or fully managed applications.



  • Importing C++ Express project to C# express?