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 .~~~