the tools you need:
- Jdk-7u11-windows-x64.exe
- Eclipse-sdk-4.2.2-win32-x86_64.zip
- Cdt-master-8.1.2.zip
- Mingw-get-inst-20120426.exe
A. Eclipse and JDK installation do not repeat here, install the CDT plugin:
Installing the CDT plugin
1> Download the CDT plugin: You can choose the version of Eclipse that is right for you in http://www.eclipse.org/cdt/.
2> Install the CDT plugin: Do not install, unzip to eclipse the same directory, that is, the extraction of the CDT compression package features, plugins the entire folder to the Eclipse installation files, restart Eclipse.
B. Installing MinGW
1> Configuring environment variables (very important)
The steps are as follows: Open: System variables, environment variables, advanced system settings, properties, computer, "edit the following system variables:
Assuming that my mingw is installed on the D drive, this is just my installation path and changes according to your own installation path!
Variable Name variable value
Path D:\MinGW\bin; (This path should be in the first place!) )
Library_path D:\MinGW\lib
C_includede_path D:\MinGW\include
Cplus_include_path D:\MinGW\include
2> Change
The "Mingw32-make.exe" under D:\MinGW\bin is renamed "Make.exe" because Eclipse uses the "make" file name in the system instead of "Mingw32-make". Of course, if you don't want to change mingw, you can modify the settings in Eclipse, and when you add a task to "Make targets view", "Build Command" cancels "use default" and uses "Mingw32-make". Also change "make" to "Mingw32-make" in "Project Properties->make Project". But it is recommended to take the first more simple approach!
3> Test
(1) Setting Instructions for "System environment variables" after installation is complete
Execute the next make command in cmd (such as D:\mingw\bin>make.exe) and if "***no targets specfied and No make file found Stop" appears, the setting succeeds. This also does not affect the use of visual c++6.0, or it will not compile under eclipse with the CDT-coding/C + + program.
(2) Confirm MinGW installation and environment variable setting is effective
Enter "Gcc-v" in cmd, if the screen appears "GCC is not an internal command or external command, nor is it a program or batch file that can be run." "Indicates a problem with the environment variable setting. If not, indicates a successful setting.
C. Configuring Eclipse
1> is set up in eclipse as follows: Window=>properties=>c/c++=>new CDT project Wiz=>makefile binary in Project Parsers is set to PE Windows Parser.
2 > Configuring the Debugging Environment
In Eclipse project=> properties=>c/c++ build=>settings binary parsers is set to PE Windows Parser.
At this point, if nothing happens, eclipse can already write/debug C + + code.
D. Create Run Hello
1> Open the C + + editing interface: Select C + + in Window->open perspective->other and OK.
2> Create Project: File->new->project Select "C Project" in C + + and Next, in Project name, fill in Hello and then next, then finish.
3> Add code: File->new->other Select the source File,next in C + +, fill in the hello.c in the source file (note that you must write. C otherwise the program cannot execute), then finish. Then fill in the code:
#include <stdio.h>
int main (void)//re-emphasis is int main () instead of void
{
printf ("Hello,c language!");
return 0;
}
Save (Ctrl+s)
3> Compilation: ctrl+b (shortcut key)
4> run: Run->run as->local C + + application
WINDOWS7 SP1 64-bit under Installation configuration Eclipse+jdk+cdt+mingw