UbuntuLinux10.04 build a C and C ++ compiling environment

Source: Internet
Author: User
1. Go to the UbuntuLinux10.04 terminal and enter sudoapt-getinstallgcc. If you downloaded all software packages online before, this step can be omitted. 2. Enter sudoapt-getinstallbuild-essential to install various required software and header files. For example: in fact, it is so simple that a C and C ++ compiling environment has been established. The following is the compilation method: write a simple C program

1. Go to the Ubuntu Linux 10.04 terminal and enter sudo apt-get install gcc. If you downloaded all software packages online before, this step can be omitted.

2. Enter sudo apt-get install build-essential to install various required software and header files.

For example:

In fact, it is so simple that a C and C ++ compiling environment has been established.

The following is the compilation method:

Write a simple C program

Drag the written file to the terminal and get a path, write gcc before the path, and write-o appname after the path.

Combined gcc '/home/garfied/desktop/c. c'-o appname

After the command is executed, a file named appname is generated in the/home/garfield/folder.

Drag the file to the terminal to execute this simple C program .~~~

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.