[.net] create C++ winforms project WITHOUT CLR

Started by
14 comments, last by davepermen 17 years, 6 months ago
In Visual Studio 2003 if you create a WinForms project in C++, by default you get the regular C++ style syntax and none of the CLR stuff. But in Visual Studio 2005 the project automatically gets created with CLR and so pointers (*) turn into (^) and using statements get added. How can you create a C++ Winforms project in VS2005 without this happening? How can you create it without CLR and just plain C++?
Author Freeworld3Dhttp://www.freeworld3d.org
Advertisement
I don't think you got the regular C++ style syntax, you got the really dodgy 'managed bits tacked onto C++' syntax. With VS2005 they've dramatically *improved* the syntax (which is called C++/CLI). You simply cannot get WinForms without the CLR, since all of the WinForm classes themselves are managed code.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
But in VS2003 you can create a winforms C++ project without all the odd C++ syntax. And I can then load that project into 2005 and compile just fine. So there must be a way to create it in 2005.
Author Freeworld3Dhttp://www.freeworld3d.org
Quote:Original post by soconne
But in VS2003 you can create a winforms C++ project without all the odd C++ syntax. And I can then load that project into 2005 and compile just fine. So there must be a way to create it in 2005.


Compare the settings to see if there is a switch not set in VS 2005.

Well that's the thing, when you create the project in VS2005 there is no switch. There are no settings, just the "ok" button.
Author Freeworld3Dhttp://www.freeworld3d.org
can you still create an mfc application?
Quote:Original post by BradSnobar
can you still create an mfc application?


Yes MFC is still supported in Visual Studio 2005.
2003 had "Managed C++"
2005 has "C++/CLI"

two different languages, but NONE of those are ordinary c++. both are c++ in a managed world. 2003 just looks like ordinary c++, wich is quite dangerous. 2005 does add difference to make it obvious wich part of the code is managed, and wich isn't.

afaik 'Managed C++' got deprecated in 2005 => you can't normally create projects using it. but you can still compile the old code using it (against the .net 1.1 framework, that is, i guess). so better check the options in the project (not at creation time, but afterwards. rightclick the project in the projectbrowser, and choose settings)
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Reasons I'll continue to stick with C++ Builder.
Author Freeworld3Dhttp://www.freeworld3d.org
as long as you don't need winforms or anything else that IS .NET-based, you don't need the CLR, and can disable it in the options. and then you can continue coding as usual.

but if you want to use anything of .NET, you obviously have to .. use .NET. winforms are .NET, ergo there's no way around it. but you can use win32 if you want (but i won't suggest it to you ever...).

possibly you should just not be scared of .NET, it's a great tool for a lot of things.
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

This topic is closed to new replies.

Advertisement