Linux Study Notes 2: Install eclipse and GCC

Source: Internet
Author: User

******************************

Install eclipse

******************************

 

Today, I installed eclipse in Ubuntu. The method is very simple. I can find it in the Ubuntu Software Center. After the download, I opened eclipse and found that it was just an empty shell, no programming language is supported.

Then I remembered that eclipse had to install plug-ins to compile Java, so I went back to Ubuntu Software Center to search for Eclipse plug-in to find Java.

 

One advantage of using Ubuntu is that the software will be downloaded after it is found, and it will be automatically installed after the download. You do not have to worry about it yourself.

 

Next, I want to find a plug-in that supports C ++.

 

PM

I found it. In eclipse, the C/C ++ plug-in is called CDT. It needs to be downloaded from www.eclipse.org/cdt/, and then to a nightly build. My version is 7.0, that is, a zip file named CDT-master 7.0 (its download page is simple and slow enough ).

 

There is an introduction to installation.

 

To install CDT:

  1. Download the master ZIP file and put it somewhere on your machine.
  2. Fire up eclipse (the platform run-time 3.6 is minimum recommended)
  3. Help-> install new software...
  4. Add... In the master zip as an archive site
  5. Under CDT main features select the one you want. C/C ++ Development
    Tools is the main one. The SDK adds in the schemas and source
    Building extensions to the CDT. The C/C ++ development platform is
    Tools without the GNU toolchain support.
  6. You can install other neat things, including the mylyn bridge, from
    The CDT optional features category.

It seems that there is a problem when importing the ZIP file downloaded to the CDT through this method.

 

I used another method:

 

In eclipse: Help-> install new software ....

 

Click Add...

Name field: CDT

Location: entry: http://download.eclipse.org/tools/cdt/releases/new

Click OK. The related CDT version will appear below. I chose CDT 2.2 and installed it successfully. Restart eclipse to create a new C ++ project!

 

******************************

Initial GCC Test

******************************

 

I wrote a program in the book:

 

# Filename: Hello. c
# Include
Int main (void)
{
Printf ("Hello world, Linux programming! ");
Return 0;
}

 

Then compile with GCC hello. C-O hello on the command line, but the delimiter translation is incorrect.

 

This problem should be related to my program.

Solve the problem later.

 

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: info-contact@alibabacloud.com 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.