views:

54

answers:

4

Hi,

I want to create applications in windows that has complete portability (within windows OSes of course). I have tried using one application written in Visual C++ but I had a real tough time in making it run in other windows OS (like it required .net framework libraries to be installed). This put me on the back foot because I had to copy a set of DLLs from one machine to another and most of the time something works some does not.

And I am TOTAL amateur in writing windows based applications since my technological forte is mostly Java. Where to kick off? (like which tools/IDEs to begin with since I am seriously into writing my own utilities/tools).

I am open to clarification should you guys feel my question is vague/blunt.

Thanks.

+3  A: 

Visual C++ should be easily able to do what you want. It sounds like you created a C++/.NET project, which will generate a dependency on the .net libraries. You need to choose a different project type when the wizard starts up.

If you have a paid version of Visual C++, you might try clicking on "MFC Application". A lot of people are down on MFC these days, but it's still a quick way to get a C++ Windows app off the ground. Make sure you choose the option to statically link the MFC libraries, or you'll have another dependency.

MFC isn't included in the free version of Visual C++, so you'll need to go old-school and work directly with the Windows API or find another package such as QT or Wx to link with.

Mark Ransom
I guess it also depends on how far back down the windows tree you want to go. I can't imagine .Net 3.0+ works on 95/98 but I haven't checked. Best to go stick with a platform neutral middleware (Is that the correct term?) like QT/Java to guarantee as little problems as possible. Another thing; if you're coding in .NET you might also want to consider making your code backward compatible with older .NET versions i.e. don't use facilities not recognised in older .Net version
Dark Star1
+1  A: 

If you really want it to work on every version of windows your best bet may be to go the route of full cross-compatibility. Grab the Boost, QT, and possibly ACE libraries and stay away from making OS calls directly. There's a free version of Visual Studio which is probably what you want for an IDE for personal development, if you're doing commercial stuff then get the full version.

tloach
Thanks for your response. I am not planning to do any commercial stuff. Just small utilities. One crude example I can say might be I should provide a file selector dialog to take a file as input and read the file and filter all the numbers and produce an output file). I can do this using Java swings within no time but I am curious on writing a windows equivalent.
Bragboy
+2  A: 

You can use .NET, and if you stay in 2.0, use standard components, it should work fine. You may need to make a few changes to work anywhere, buy very possible.

http://www.mono-project.com/Main_Page

You could either use Visual Studio or the free IDE. Sharp develope or Mono Develope.

eschneider
For complete Windows portability I would assume he wants everything back to Windows 95, which doesn't work with .NET as far as I know.
tloach
I don't think anyone cares about Win95
eschneider
+1  A: 

Why not use Java. The JVM is on more systems then .NET and now your app will work on any OS not just windows. Plus java is easier for a beginner then C/C++ and less chance that your program will cause BSODs.

jamone
Yes, I can use Java, but I feel I have already mastered it. I want to make my hands dirty in writing C/C++ applications.
Bragboy