views:

227

answers:

8

To quote the FAQ, 'No question is [...] too "newbie"'

What is the best way to set up an Windows system (vista, if that matters) to work with C++?

Preferably with a nice IDE, easy compiling of software (support for make files, etc.), but suitable for a beginner.

I would quite like the IDE to use a relatively portable format, such as makefiles and configure scripts, nothing too proprietary.

I would also like the ability to add new libraries etc. without much hassle, and work with the majority of C++ code others have written.

I am comfortable using the command line.

Thanks for the help, hopefully the question is clear. And apologies if it's already been answered, i did have a look for similar questions.

+2  A: 

There are quite a few good IDEs for C++ available on Windows.

The de-facto standard for professional software development is Microsoft's Visual Studio, which is available in different versions, like the free Express Editions. This will give you a great tool-chain for Windows development.

However, for a more "cross-platform" approach, you should have a look to the free Eclipse C++ Development Tooling, which is available for many platforms. As long as your own code is platform-independent, the whole project can be shared between Windows, Linux, Mac, etc.

Other alternatives are MinGW or CygWin that both allow to use the GCC toolchain on Windows.

beef2k
+1  A: 

Microsoft's Visual Studio is powerful but rather proprietary. If you prefer open/portable stuff, I recommend Dev-C++ and Cygwin.

Alex Martelli
A more recent variant of something like DevC++ is <a href="http://www.codeblocks.org">codeblocks</a>
none
+2  A: 

Try the MinGW compiler, it will come with a C and C++ compiler, Make, etc--among many others. This can be used from the command line, pretty easily: g++ -o someprogram.exe somecode.cpp

As for an IDE, there are lots out there. Right now I am using Code::Blocks, and so far it's been really nice. As well, it already supports the GCC compiler, and sets many of the appropriate flags for you, so all you'll really need to do is hit the "build" button.

Some others you might want to try are Eclipse, which is really powerful, but lots of its "power" will be really confusing and difficult to use until you start getting used to it. Visual C++ is another one, which (obviously) would integrate very nicely into Windows. Of course, you could always use emacs :)

Carson Myers
+2  A: 

Microsoft's Visual Studio has a free express edition which contains pretty much everything you need to program c++.
For a Gui, the main choices are probably, MFC (old and ugly), CLR/.Net (new and confusing) or look at Qt(now LGPL) or wxWigets

Martin Beckett
I don't think the express version comes with MFC, right?
Aardvark
You can build MFc apps with the platform SDK, but you really don't want to start to learn MFC now.
Martin Beckett
+5  A: 

I know this is not exactly 'nothing to proprietary' but you should give a look at the free Express Edition of Visual C++. Under its covers you'll get all the familiar make and command line tools, but wrapped in a polished IDE.

If you're really comfortable with the command line then you can make an IDE from code editor on top of a compiler/debugger suite. MS's own command line tools come with the platform SDK (free) and you get an awesome debugger in Windbg. My personal favorite code editor is Code Insight. I wish so hard for a Mac version /sigh.

Remus Rusanu
+1  A: 

FWIW, I recently went through this and tried the VC++ Express and QT Creator based stuff. Coming from a linux/unix background I found that QT was a little better since it was using the Ming compilers and some make based constructs.

tim
+1 for Qt Creator. It's very impressive IMHO. It's a pretty small download and I was up and running in minutes.
Rob
Yeah, and QT is super slick. With the cross platform support it blows away VC++. The editor is a bit weak, but it will come along.
tim
A: 

If you will only be hacking for windows I would go for Visual Studio. It will definitaly save you time you can spend on coding instead. Most open source out there for windows either already have VC project, and if they don't it is usually very simple to set one up. And normally they have either make or nmake files for you to build VC compatible libararies to link with.

Niclas Lindgren
+1  A: 

I suggest you evaluate CodeBlocks.

EvilTeach