Native Win c++ coding with visual studio

Soldato
Joined
18 Oct 2002
Posts
7,139
Location
Ironing
I've been doing c#.NET for a while now, but I'm keen on investigating native (non-.net) win32 coding written in c++ as they seem to allow better memory management than .net does.

I've got VS.NET 2003 - is there any way I can write and compile non-.net c++ code using this?
 
So you want to try Un-managed C++? Unless you know what you are doing you will have more problems with memory management.

No you cannot compile no .NET code with any .NET IDE. You will need Visual Studio 6.0 or at least Visual C++ 6.0, there are other free alternatives which you could use as well.

TrUz
 
Hmmm, ok.

My problem is that I've developed an app in .NET that works great on windows, but needs to be cross platform. Now, I can either tweak the .NET code so that it runs fine on mono (therefore on mac, *nix) and maintain a single codebase, or accept an offer from a mac guy who's happy to port my code to native mac. If the latter, it might make sense to streamline the .net code down to something more native on windows.

I'm currently leaning towards the first option, but wanted to know where I stood on the second one.

Thanks.
 
You need something like visual studio c++ express edition (free). It's what I use for my unmanaged C++ coding. Its a really good IDE to be honest. Now if you writing unmanaged win32 c++ code as well that is not going to be crossplatform
(Since your using platform specific code). You want to look at something like SDL or WxWidgets. I got no idea about Mac but *nix can use Mono for a lot of C# stuff as you say.
 
Last edited:
If you want it to be cross-platform you might want to consider Java, or I streamline you application for Windows like you say, and let the Mac guy port the code.

If you want it to run on *nix then it will need porting again, how much would be involved I am not sure. Java is really the only true cross-platform language that will not give you major head aches.

TrUz
 
Currently, the code runs fine under mono, and therefore works on linux and probably mac os as well. The UI is a bit screwed up though, so I was thinking of ways to make it more user-friendly. I suppose rewriting from scratch is a bit of a desparate option....
 
Well mono states it will run .NET applications on *nix and Mac - Have you tested it on a Mac yet?
 
TrUz said:
Java is really the only true cross-platform language that will not give you major head aches.

Apart from VB, pretty much every language is.. unless your using platform specific libraries. I can name about 5 languages that run in VM's that are totaly platform agnostic.

Another way you can get round this is to check defines,
#ifdef win32
do your win32 code
#else
do your other stuff.

Your better trying to write crossplatform code in the first place though.
 
Last edited:
TrUz said:
Well mono states it will run .NET applications on *nix and Mac - Have you tested it on a Mac yet?

Not yet, don't have one.

If the UI's broke in that, I'll probably recode the frontend to us wxwidgets or something.
 
growse said:
I've got VS.NET 2003 - is there any way I can write and compile non-.net c++ code using this?
Yes. File->New Project->C++->Win32...

Personally I'd port to Java. .NET to C++ is going to be very hairy and costly. C++, the language, actually doesn't have any concept of memory management - you have to write everything (or use a library).
 
Last edited:
Back
Top Bottom