C C program with CDT plugin under Eclipse
The author is no two http://blog.9cbs.net/sundaylin
1 CDT plugin download http://www.eclipse.org/CDT/
2 CDT is just a shell that is really compiled C C is GCC, GDB and Make.
Want to use Using MingW http://www.mingw.org/download.shtml
What I am here is MINGW-3.1.0-1.exe (I already have an updated version when I load)
3 Installing MINGW has been next to NEXT (a hypothesis you are installed in the D disk)
4 Set the environment variable of mingw
Create a text file to post the following
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE / SYSTEM / Controlset001 / Control / session manager / environment]
"Path" = "D: // mingw // bin;% PATH%"
"Library_path" = "d: // mingw // lib"
"C_include_path" = "D: // mingw // incrude"
"CPLUS_INCLUDE_PATH" = "D: //mingw/include//c //include//c //3.2.3//mingw32; d: // mingw // include //c //3.2.3//backward ;d://mingw/include "
The registration form is written by D: // jboss, this is comment after "//" semicolon.
Import this registry again for REG
note! ! After importing the registry, you must see if you click "OK" to take effect. ! !
To test the environmental variable, set it wrong
Run -cmd hit G if "G is not internal or external command ..." So your setting is right
Your first C program
1 Open Eclipse New-> Project-> Standard Make C Project Re-enter the project named TEST
2 In Project-> Properties-> C / C Make Project, "MINGW32-MAKE" is changed to "MingW32-make"
Press "Apply" "OK"
3 new-> file fill in main.cpp
Open him
Put on
#include
Using namespace std;
INT main (void) {
COUT << "Hello World";
Return 0;
}
4 new-> file fills in "makefile" without subsequent name
Put on
All:
G main.cpp -o main
note! ! "G " is before the Tab button is not available.
The string behind "-o" is the name of the generated EXE
5 Window-> Show View -> Make Targets
Add Maketargets Press "OK" to
Double-click this maketargets to automatically help you generate EXE
6 In Project-> Properties-> C / C Make Project-> binary paser changes Elf Parser to PE Windows Parser
7 big megadownload megadownloadtebiz l
You will see Hello World below.