Eclipse Cdt Installation Method

Source: Internet
Author: User

In the past two days, I got a dual system for my computer. In addition to the original Windows 7 system, I installed the Linux system and used Ubuntu (Click here to go to the corresponding download page ). At first, I installed fedora9 in Linux. For anyone who has never touched the Linux system, the use of fedora is a crash. Even worse, I use the English version. There is no way to download Linux again, just a CD. Installation System. There was a problem when installing the system, but it was a small problem. I solved it all at once. If someone found this article and encountered a problem, leave a message and ask, maybe I can help solve it.

Entered the question.
Install Eclipse in two ways:
First, install Eclipse through the built-in program installation function of Ubuntu, Application> Ubtuntu Software Center, search for Eclipse to install.
The second method is to use the command: Application-> attachment-> Terminal
Then enter (you may need to enter the password in the middle ):
Sudo apt-get install eclipse
Sudo apt-get install eclipse-PVDF
Sudo apt-get install eclipse-jdt
This command is found in a blog post to solve the problem of installing CDT (that is, the plug-in that can compile C/C ++ Code). The original address is: use eclipse on ubuntu for C/C ++ code compilation

For those who first came into contact with Linux, they may not know how to use the command or why to use the command. In fact, I am not very clear, but I want to be related to the system, such as Windows Installation Software, are in the exe format, and then double-click, the next step will be OK, however, Linux should be installed using commands for security considerations or something. Ubuntu is good, and software installation is relatively convenient. Like I was just starting to play fedora, installing software is just a crash and there will always be less dependent libraries. To install the software by running commands, you must first open the terminal (equivalent to DOS, or a command prompt in the Windows attachment) in the application-> attachment-> terminal. Enter the password in the terminal, unlike
In Windows, there will be a display, such. If the terminal does not display any symbols when you enter the password, do not worry. In fact, all you just entered is already on the terminal, but it is not displayed. Continue and press Enter.
When using the first method for installation, the following error may occur during the installation of the CDT plug-in.
An error occurred while installing the items
Session context was :( profile = PlatformProfile, phase = org. eclipse. equinox. internal. provisional. p2.engine. phases. install, operand = null --> [R] org. eclipse. ant. ui 3.4.1.v20090901 _ r351, action = org. eclipse. equinox. internal. p2.touchpoint. eclipse. actions. installBundleAction ).
The artifact file for osgi. Bundle, org. Eclipse. Ant. UI, 3.4.1.v20090901 _ R351 was not found.
I searched for it, saying that it was not installed on eclipse-PVDF or eclipse-jdt. The URL of the description is as follows: Source/Eclipse/+ bug/477944. All in English. Therefore, if you use the first method, it is best to enter the command on the terminal:
Sudo apt-Get install eclipse-PVDF
Sudo apt-Get install eclipse-jdt

Install the CDT plug-in as follows:
1. Start eclipse,
2. Select help-> install new software..., copy the following address under the work with box:
3. Select collaboration-> mylyn Bridge: C/C ++ development, install and restart eclipse.
4. Select programming versions> eclipse C/C ++ development from the options 2 and 3 above. The hard disk is not expensive now. Restart eclipse and try tutorial.
When installing mylyn Bridge: C/C ++ development, if you directly choose to install eclipse C/C ++ development, the following error will occur:
Cannot complete the install because one or more required items cocould not be found.
Software being installed: mylyn Bridge: C/C ++ development (Org. Eclipse. CDT. mylyn. feature. Group
Missing requirement: mylyn Bridge: C/C ++ development (Org. eclipse. CDT. mylyn. feature. group requires 'org. eclipse. mylyn. context. core 3.0.0 'But it cocould not be found

Note: Remember to install the necessary C ++ tools. Install a series of development tools such as GCC tool chain and make. The command is as follows:
   sudo apt-get install build-essential

Otherwise, the following message is displayed: unresolved upload sion: <iostream>

All right, install eclipse in Ubuntu and the CDT plug-in the same fashion. Here is a post I accidentally found (csdn) and there are CDT-Related Optimization settings. It is said that eclipse's CDT smart editing is quite powerful and fast. The ease of code editing may be the best practice in all c ++ editors! Its refactoring and function implementation are all very useful. These are not supported by vs (without VC assistant) and C: B.

Post address: Configure eclipse CDT, support VC compiler, deliver score!

Oh, no, I don't know, but I think there should be no big difference between the poster and the reply recipients ~ In this case, you can play with it. In addition, I feel like C/C ++ programming in Linux, Eclipse IDE is very good. I used to play eclipse for a while, so I am familiar with this environment.

Well, after writing it, if the person who found this article needs to install this environment, what went wrong. You can leave a message. Maybe you can help solve this problem ~ Everyone is a newbie to discuss ~
At the same time, I also found a good tutorial on compiling C/C ++ in Linux. JUST CLICK: Eclipse CDT to build the first project.

I just optimized eclipse + CDT according to the above csdn post and found that there were some unnecessary ones, and the post was a bit messy. I sorted it out again, as shown below:

I. C/C ++ environment configuration: Window-Preferences-C/C ++
1. Appearance, select Group method definitions in the Outline view
2. Code Style: Use New to create a New Code Style named qpsoft and initialized to BSD/Allmain, and then modify some details as expected. I suggest using the default method, which may be the reason why I used to compile Java. You can follow your own wishes.
3, Editor-Content Assist-Auto-Activation-Delay (MS), the original value is 500, changed to 100, intelligent prompt speed will be very fast!
4. Indexer, clear Files to index up-front content, and modify the Cache limits value to be as large as possible to increase the speed!

2. Modify the smart prompt shortcut:
Window-Preferences-General-Keys, enter the Content, find the Content Assist, and modify it to Shift + Space in the Binding, which requires a lot of convenience.
I think this can be done according to my habits.

3. Other settings
1. Window-Preferences-General-Editors-Text Editors, select Show line numbers, and set Print margin column to 110
2. Window-Preferences-General-Workspace, cancel Build automatically, and select Save automatically before build
I don't understand this setting, but I also set it like this. If you understand this article, please leave a message to answer it.

Iv. Extensions through plug-ins
1. Supported Subversion: officially released by Eclipse. The home page is at /.
You can copy the address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.