1. Open Logging. For example, the installation URL of Helios In eclipse is CDT 7.0.1 for eclipse Helios (http://download.eclipse.org/tools/cdt/releases/helios ).
2. Next, open the eclipse software. Open the help-> install new software menu. In the displayed dialog box, select "add" next to "work with", and then enter CDT (or any text you want to enter) in the displayed dialog box ), enter the address you just obtained in location, click OK, and then install it.
3. Install mingw.
(1) After the installation is complete, the setting of "system environment variables" is described as follows:
Edit path and add "C:/mingw/bin;" at the beginning of the variable value. This sentence must be placed at the beginning to prevent /. make commands such as net conflict, and rename the mingw32-make.exeunder C:/mingw/bindirectory as make.exe, and then execute the make command (such as C:/mingw/bin> make.exe) in cmd ), if "*** no targets specfied and no make file found stop" is displayed, the setting is successful. This does not affect the use of visual C ++ 6.0. Otherwise, the C/C ++ program compiled with CDT in eclipse cannot be compiled.
(2) Check whether mingw installation and environment variable settings take effect.
Enter "gcc-V" in cmd. If "GCC is not an internal or external command, or a program or batch file that can be run," appears on the screen ." Indicates that the environment variable settings are incorrect. If not, the setting is successful.
4. Install GDB. This is used for debugging. After downloading it, decompress it to the C: \ mingw directory.
5. Install msys. Installed by default. When the console is displayed, enter the appropriate information. It may be because the operating system is Windows 7 x64 and the default installation fails. If the following error occurs after the default installation:
M. allocationbase 0x0, M. baseaddress 0x715b0000, M. regionsize 0x460000, M. State 0x10000
F: \ a9_fs_1207 \ 2526_gemini_0828 \ tools \ msys \ bin \ sh.exe: *** couldn't reserve space for cygwin's heap (0x715b0000 <0xc70000>) in child, Win32 error 487
0 [main] Sh 7632 sync_with_child: Child 7648 (0x71c) died before initialization with status code 0x1
25422 [main] Sh 7632 sync_with_child: *** child state waiting for longjmp
Then download the MSYS-1.0.11-20090120-dll.tar.gz http://downloads.sourceforge.net/mingw/MSYS-1.0.11-20090120-dll.tar.gz? Use_mirror = jaist, use the msys-1.0.dll inside to replace the corresponding msys-1.0.dll after installation, and then execute c: \ msys \ 1.0 \ postinstall \ pi. bat. Enter the appropriate information.
6. In useEclipseWhen editing the C/C ++ program, you can select the C/C ++ appearance.
7.Eclipse CDTWhen the execution of a program is not over, you need to manually close the terminal. Otherwise, you cannot compile and execute the program. You can find the program currently running in the task manager.
8.Eclipse CDT, It is different from the general console, its output is put in the cache, must explicitly remind the output. The printf statement in C can be added to setbuf (stdout, null) In the first line of the program. The second method isEclipseAdd "fflush (stdout);" to C ++, add Endl to the output of each row to display the output.
9. eclispeCDTCommon Shortcut Keys: you can modify them in WINDOW> performance> General> keys.
CTRL + 1 quick fix
CTRL + D: Delete the current row
CTRL + ALT + ↓ copy the current row to the next row (copy added)
CTRL + ALT + ↓ copy the current row to the previous row (copy added)
Alt + ↑ interaction between the current row and the following row
Alt + ↑ the interaction position between the current row and the previous row
Alt + ↓ previous edited page
Alt + → next edited page (of course for the above)
Alt + enter display the properties of the currently selected resource (project, or file)
Shift + enter insert empty rows in the next row of the current row (the mouse can be at any position of the current row, not necessarily the last row)
Shift + Ctrl + enter insert blank lines in the current line (same principle)
CTRL + q locate the Last edited location
CTRL + l locate in a line (for those with more than 100 programs, there will be good news)
CTRL + M maximize the current edit or view (then press it, and vice versa)
CTRL +/comment out the current row, and then press it to cancel the comment
CTRL + O quick outline display
CTRL + T quickly display the inheritance structure of the current class
CTRL + W disable the current editer
CTRL + k quickly locate to the next one by referencing the selected word
CTRL + E: Click it to quickly display the drop-down list of the current editer (if the current page is not displayed, it is displayed in bold)
CTRL +/(keypad) collapse all code in the current class
CTRL + × (keypad) show all the code in the current class
CTRL + Space Code assistant inserts some code (but it is usually in conflict with the input method. You can modify the key of the input method or replace it with ALT +/for the moment)
CTRL + Shift + e display the managers that manage all Opened Views (you can choose to close or activate them)
CTRL + J forward incremental search (after pressing CTRL + J, each letter editor you enter provides a quick match to locate a word. If not, it is not found in stutes line. It is particularly useful when querying a word. This function was available two years ago)
CTRL + Shift + J reverse incremental search (the same as the previous one, but only from the back to the front)
CTRL + Shift + F4 close all open editer
CTRL + Shift + x change all selected text to lowercase
CTRL + Shift + y change all selected text to lowercase
CTRL + Shift + F format the current Code
CTRL + Shift + P locate the matched character (for example, {}) (when positioning from the front, the cursor must be inside the matched character, followed by the front, and vice versa)
Reconstruction
Alt + Shift + R Rename (one of my favorite ones, especially the rename of variables and classes, which saves a lot of labor compared with manual methods)
Edit
Shortcut for scope Function
Globally search and replace Ctrl + F
Search for the previous Ctrl + Shift + K in the text editor
Search for the Next Ctrl + K in the text editor
Select Alt + Shift + continue for global recovery.
Globally cut Ctrl + x
Global quick correction ctrl1 + 1
Global CodeCompletionAlt +/
Global context information Alt +?
Alt + Shift +?
CTRL + Shift + Space
Java editor display tooltip description F2
Java editor selects the encapsulation element Alt + Shift + Transform
Java editor selects the previous element Alt + Shift + ↓
Select the next element Alt + Shift + →
Text Editor incremental search Ctrl + J
Text Editor incremental reverse lookup Ctrl + Shift + J
Window
Shortcut for scope Function
Global activation editor F12
Global switch editor Ctrl + Shift + W
Global editor Ctrl + Shift + F6
Global View Ctrl + Shift + F7
Global Perspective Ctrl + Shift + F8
The next global editor Ctrl + F6
Next Global View Ctrl + F7
CTRL + F8
Text Editor display ruler context menu Ctrl + W
Global View menu Ctrl + F10
Global display of System Menu Alt +-
Navigation
Shortcut for scope Function
Open the structure Ctrl + F3 in the Java editor.
Global Open type ctrl + Shift + T
Global Open Type hierarchy F4
Global open declaration F3
Open external javadoc SHIFT + F2 globally
Globally open resource Ctrl + Shift + R
Global rollback history Alt + rollback
Global forward history Alt + →
CTRL +,
CTRL +.
Java editor display outline Ctrl + O
Globally open the type ctrl + Shift + H in the hierarchy
Globally move to matching parentheses Ctrl + Shift + P
Go global to the previous editing location Ctrl + q
Go to the previous Member Ctrl + Shift + ← in the Java editor.
Go to the next member in the Java editor Ctrl + Shift + ←
Text Editor to Ctrl + L
Text editing
Shortcut for scope Function
Text Editor rewrite switch insert
CTRL + ← on the text editor
CTRL + ←
Project
Shortcut for scope Function
Global build Ctrl + B
Source code
Shortcut for scope Function
Java editor format Ctrl + Shift + F
Java editor uncomment Ctrl + \
Java editor comment Ctrl +/
Add and import Ctrl + Shift + M to the Java Editor
Java editor organization import Ctrl + Shift + O
The Java editor uses try/catch blocks to enclose unset ones, which is too common. Therefore, we recommend that you set them here.
You can also use Ctrl + 1AutomaticCorrected.
Run
Shortcut for scope Function
Global debugging last started F11
Continue F8 globally
Global run last started Ctrl + F11
CTRL + 1 quick fix
CTRL + D: Delete the current row
CTRL + ALT + ↓ copy the current row to the next row (copy added)
CTRL + ALT + ↓ copy the current row to the previous row (copy added)
Alt + ↑ interaction between the current row and the following row
Alt + ↑ the interaction position between the current row and the previous row
Alt + ↓ previous edited page
Alt + → next edited page (of course for the above)
Alt + enter display the properties of the currently selected resource (project, or file)
Shift + enter insert empty rows in the next row of the current row (the mouse can be at any position of the current row, not necessarily the last row)
Shift + Ctrl + enter insert blank lines in the current line (same principle)
CTRL + q locate the Last edited location
CTRL + l locate in a line (for those with more than 100 programs, there will be good news)
CTRL + M maximize the current edit or view (then press it, and vice versa)
CTRL +/comment out the current row, and then press it to cancel the comment
CTRL + O quick outline display
CTRL + T quickly display the inheritance structure of the current class
CTRL + W disable the current editer
CTRL + k quickly locate to the next one by referencing the selected word
CTRL + E: Click it to quickly display the drop-down list of the current editer (if the current page is not displayed, it is displayed in bold)
CTRL +/(keypad) collapse all code in the current class
CTRL + × (keypad) show all the code in the current class
CTRL + Space Code assistant inserts some code (but it is usually in conflict with the input method. You can modify the key of the input method or replace it with ALT +/for the moment)
CTRL + Shift + e display the managers that manage all Opened Views (you can choose to close or activate them)
CTRL + J forward incremental search (after pressing CTRL + J, each letter editor you enter provides a quick match to locate a word. If not, it is not found in stutes line. It is particularly useful when querying a word. This function was available two years ago)
CTRL + Shift + J reverse incremental search (the same as the previous one, but only from the back to the front)
CTRL + Shift + F4 close all open editer
CTRL + Shift + x change all selected text to lowercase
CTRL + Shift + y change all selected text to lowercase
CTRL + Shift + F format the current Code
CTRL + Shift + P locate the matched character (for example, {}) (when positioning from the front, the cursor must be inside the matched character, followed by the front, and vice versa)
Reconstruction
Alt + Shift + R Rename (one of my favorite ones, especially the rename of variables and classes, which saves a lot of labor compared with manual methods)
Alt + Shift + M extraction method (this is one of the most common methods in refactoring, especially useful for a lot of mud code)
Alt + Shift + C modify the function structure (more practical. N functions call this method and modify it once)
Alt + Shift + L extract local variables (you can directly extract some magic numbers and strings into one variable, especially when multiple calls are performed)
Alt + Shift + F convert the local variable in the class to the field variable (more practical)
Alt + Shift + I merge variables (this may be a bit inappropriate inline)
Alt + Shift + V moving functions and variables (not commonly used)
Alt + Shift + z restructured regret medicine (UNDO)
Edit
Shortcut for scope Function
Globally search and replace Ctrl + F
Search for the previous Ctrl + Shift + K in the text editor
Search for the Next Ctrl + K in the text editor
Globally undo Ctrl + z
Global copy Ctrl + c
Select Alt + Shift + continue for global recovery.
Globally cut Ctrl + x
Global quick correction ctrl1 + 1
Global content assist Alt +/
Globally select Ctrl +
Delete globally
Global context information Alt +?
Alt + Shift +?
CTRL + Shift + Space
Java editor display tooltip description F2
Java editor selects the encapsulation element Alt + Shift + Transform
Java editor selects the previous element Alt + Shift + ↓
Select the next element Alt + Shift + →
Text Editor incremental search Ctrl + J
Text Editor incremental reverse lookup Ctrl + Shift + J
Globally paste Ctrl + V
Global redo Ctrl + Y
View
Shortcut for scope Function
Zoom in globally Ctrl + =
CTRL +-
Window
Shortcut for scope Function
Global activation editor F12
Global switch editor Ctrl + Shift + W
Global editor Ctrl + Shift + F6
Global View Ctrl + Shift + F7
Global Perspective Ctrl + Shift + F8
The next global editor Ctrl + F6
Next Global View Ctrl + F7
CTRL + F8
Text Editor display ruler context menu Ctrl + W
Global View menu Ctrl + F10
Global display of System Menu Alt +-
Navigation
Shortcut for scope Function
Open the structure Ctrl + F3 in the Java editor.
Global Open type ctrl + Shift + T
Global Open Type hierarchy F4
Global open declaration F3
Open external javadoc SHIFT + F2 globally
Globally open resource Ctrl + Shift + R
Global rollback history Alt + rollback
Global forward history Alt + →
CTRL +,
CTRL +.
Java editor display outline Ctrl + O
Globally open the type ctrl + Shift + H in the hierarchy
Globally move to matching parentheses Ctrl + Shift + P
Go global to the previous editing location Ctrl + q
Go to the previous Member Ctrl + Shift + ← in the Java editor.
Go to the next member in the Java editor Ctrl + Shift + ←
Text Editor to Ctrl + L
Search
Shortcut for scope Function
Globally displayed in the file Ctrl + Shift + u
Global Search dialog box Ctrl + H
Declare Ctrl + G in the global Workspace
Reference Ctrl + Shift + G in the global Workspace
Text editing
Shortcut for scope Function
Text Editor rewrite switch insert
CTRL + ← on the text editor
CTRL + ←
File
Shortcut for scope Function
Save Ctrl + x globally
CTRL + S
Print Ctrl + P globally
Globally Disable Ctrl + F4
Globally save Ctrl + Shift + S
Globally Disable Ctrl + Shift + F4
Global attribute Alt + enter
Globally create Ctrl + n
Project
Shortcut for scope Function
Global build Ctrl + B
Source code
Shortcut for scope Function
Java editor format Ctrl + Shift + F
Java editor uncomment Ctrl + \
Java editor comment Ctrl +/
Add and import Ctrl + Shift + M to the Java Editor
Java editor organization import Ctrl + Shift + O
The Java editor uses try/catch blocks to enclose unset ones, which is too common. Therefore, we recommend that you set them here.
You can also use Ctrl + 1AutomaticCorrected.
Run
Shortcut for scope Function
F7 is returned in one global step.
Skip F6 in one global step
Global One-Step Jump to F5
Global One-Step Jump-in and select Ctrl + F5
Global debugging last started F11
Continue F8 globally
Shift + F5 in one step using filters globally
Globally Add/remove breakpoints Ctrl + Shift + B
Global display Ctrl + d
Global run last started Ctrl + F11
Run Ctrl + R globally
Execute Ctrl + u globally
Reconstruction
Shortcut for scope Function
Global undo reconstruction Alt + Shift + z
Global extraction method Alt + Shift + m
Global extraction of local variables Alt + Shift + L
Global inline Alt + Shift + I
Move Alt + Shift + V globally
Globally rename Alt + Shift + R
Global redo Alt + Shift + Y