Jump to content
  • Advertisement
Sign in to follow this  
dxFoo

[.net] VC++ 2005 GUI question

This topic is 4861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've used Managed C++ (/clr option) with a win32 console application. With the CLR Form Application, is this Managed C++ as well, or C++.NET, or are they the same thing?

Share this post


Link to post
Share on other sites
Advertisement
As far as I know they are the same thing. If you create a new WinForms Application you will get a C++ project with managed extensions, which somehow is .NET.
The CLR (Common Language Runtime) is a major part of .NET.

But you might still wait for someone, who is more advanced in .NET programming, to back this up...

Share this post


Link to post
Share on other sites
This depends on which visual studio/compiler you are using. With VS.NET 2003 and before, the '/clr' option specified that you wanted to target the Common Language Runtime, and to use Managed Extensions for C++ (the __gc and other myriad of double-underscored keywords).

Starting with VS 8.0 (VC++ Express, Visual Studio 8, etc.) and the compilers of that version, the '/clr' option specifies, once again, a CLR target, but utilizing the new C++/CLI format (which is, IMHO, far superior). Understand that both of these compile options target the CLR as opposed to generating native code. That is how they are able to utilize and easily interoperate with other CLR languages and the .NET Runtime.

If you are fond of the previous (Managed Extensions) syntax, you can still use it by specifying '/clr:oldSyntax' as opposed to plain old '/clr'.

If you are starting a C++ CLR Form Application, yes, this will be compiled CLR bytecode, not native code. As such, it can directly utilize the .NET Runtime, and interoperate with all other CLR languages (C#, VB.NET, etc.).

Things get dicey when you say "Managed C++" and "C++.NET". C++.Net doesn't really exist as a term, although I'm sure people get the gist of what you are saying. "Managed C++" is often used to indicate any C++ application that is targeted to compile to CLR, although sometimes it is used to abbreviate the somewhat longer "Managed Extensions for C++" for the sake of brevity. I generally say "C++/CLI" now, because all my managed C++ code is compiled using the new syntax, and it elminates any ambiguities.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!