Composition and installation of C development environment in Linux

Source: Internet
Author: User
Tags crypt
The composition and installation of the C development environment in Linux-Linux general technology-Linux programming and kernel information. For details, refer to the following section. This article introduces the composition and installation of the Linux C development environment, so that readers can have a preliminary understanding of the Linux C development environment.

Do you know about Linux? I believe that more and more people will say "yes. To what extent do you know? It is undeniable that most Linux users are still at a relatively low level of understanding about Linux, they may execute several commands, configure several services, use rpm to install software, operate the KDE/Gnome interface, and so on. But when they encounter software that needs to be compiled and installed, in the face of some simple error information, they are helpless. If you really want to jump to these basic levels, you will not be able to understand some underlying things, such as the C development environment in Linux and other operating system knowledge in this article.

Linux and C are born with an unknown source. You may know that the Linux operating system kernel is mainly written in C, and many software in Linux is written in C, especially some well-known service software, such as MySQL and Apache. Beginners may encounter various errors when compiling software such as MySQL. In fact, as long as you have a preliminary understanding of the Linux C development environment, you can choose to solve some errors during the installation process.

The C development environment in Linux is different from that in Windows. In Linux, a complete C development environment consists of the following three components:

1. function library: glibc

To build a complete C development environment, Glibc is essential. It is the main function library of C in Linux. Glibc has two installation methods:

A. Install the function library for testing and use different options to try the new function library during program compilation.

B. Install it as the main C function library, which is used by all newly compiled programs.

Glibc2 contains several additional packages: LinuxThreads, locale, and crypt. Generally, their file names vary with versions and are similar to the following file names:

Glibc-2.06.tar.gz
Glibc-linuxthreads-2.0.6.tar.gz
Glibc-localedate-2.0.6.tar.gz
Glibc-crypt-2.0.6.tar.gz

2. Compiler: gcc

Gcc (GNU CCompiler) is a GNU multi-platform compiler with powerful functions and superior performance, the gcc compiler can compile and connect the C and C ++ language source programs, programming sequences, and target programs into executable files. The suffixes and explanations of some source files supported by gcc are as follows:

. C is a suffix file, c language source code file;

. A is a file with a suffix. It is a file library consisting of the target file;

. C,. cc or. cxx is a C ++ source code file;

. H is a suffix file, which is the header file included by the program;

. I is a file with a suffix. It is a pre-processed C source code file;

. Ii is a file with a suffix. It is a pre-processed C ++ source code file;

. M is a suffix file, which is an Objective-C source code file;

The. o file is the compiled target file;

. S is a suffix file, which is an assembly language source code file;

. S is a precompiled assembly language source code file.
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.