---restore content starts---
Today began to follow the Linux C programming related video of the note, I hope to continue ...
1. The composition of the development environment
editor : VI;
compiler : Select the GNU C + + compiler for GCC;
Debugger : widely used gdb;
function library : glibc;
System Header File : Glibc_header;
2. Precautions to install Linux
The GCC/GDB can be installed automatically by selecting "Development Tools" in "Program development" during installation.
If you want to develop a graphical interface, you also need to choose GNOME/KDE software development.
3, IDE (Integrated development environment: Set editing, compilation, debugging and other functions in a tool)
Kylix: Known as Linux under the Dephi;
Kdevelop
Rhide: Similar to turbo C + +
4. Compiler: GCC (GNU ccompiler)
is the GNU launch of the multi-platform compiler, the following is the GCC support compiled some of the source file suffix and its interpretation
. c suffix C language source code file
The. h suffix is the header file that the program contains
The. o suffix is the compiled target file
Example: Gcc-o Hello hello.c Note: 1, the GCC compiles our source program; 2,-o option requires the compiler to give us the output executable file named Hello; 3, hello.c is our source program file; 4, execution can see the program's Output results
To view the GCC version number:
Gcc-version
5, Function library: glibc
GLIBC is a C library that provides system bar and call functions, such as open,malloc,printf, etc.
View the version of GLIBC:
ls/lib/libc-*
6. System Header File: Glibc_header
If the system header file is missing, many C programs that use the system function will not compile.
If the user installs these packages less during installation, it is impossible to compile the C source program, which can be quickly installed in the Linux C Development language environment through the RPM package.
7, Linux under the C program development process:
(1) Using VI tools to edit the writing source program;
(2) Save as *.C;
(3) Compile the binary executable file with GCC;
(4)./a.out Execution (when GCC does not specify an executable file name with the-o option);
(5) A problem can be debugged using GDB;
---restore content ends---
Linux C Programming: The development environment of C language under Linux