Tuesday, September 4, 2012

How to install Eclipse for C++ on XP and Vista

This is kind of a strange post, but I spent all day with Chris trying to figure out how to install Eclipse for C++ development. There are tutorials for how to install Eclipse for Java, but not C++. Since we have it figured out, we thought we'd share for all the others trying the same thing. Here's what you do (be patient these loadables are HUGE):

1. Download and install MinGW from http://sourceforge.net/projects/mingw/files/

Click on "Looking for the latest version? Download mingw-get-inst-20120426.exe (662.7 kB)"

2. Add MinGW bin directory to path enviroment variable (step by step below for XP, Vista is similar):

Go to Control Panel/System/Advanced/Environment Variables
Select path in the list of System variables
Press Edit
Go to the end of path list
Add a ; and add bin directory in MinGW directory (e.g., ;c:\MinGW\bin)

3. Download and install Java - Windows Online from http://www.java.com/en/download/manual.jsp

4. Download Eclipse IDE for C/C++ Developers, from http://www.eclipse.org/downloads/index.php (32-bit or 64-bit)

Find out if you have 32-bit or 64-bit OS by going here: http://support.microsoft.com/kb/827218

5. Unzip eclipse-... .zip
Create a shorcut on your desktop to Eclipse (e.g., to c:\Program Files\eclipse\eclipse.exe)

All done! Now try it:

1. Start Eclipse (close that big window with the icons that comes up)

2. Name your workspace.

3. Create a project: File -> New -> C++ Project

Select: Executable -> Hello World C++ Project (NOT a GNU Autotools project!)

4. Build and Run!

1 comment: