Linux C Programming: The development environment of C language under Linux

Source: Internet
Author: User

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

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.