C Programming in Linux

Source: Internet
Author: User

 

Author:Sun Qiong, Senior Lecturer at Huaqing vision embedded College.

C language programming in Linux is the same as C programming in other environments. It mainly involves the editor, compilation linker, debugger, and project management tools. This article is part of the Linux operating system in the <embedded engineer vocational training course> Phase I of the embedded college. Here we will give a brief introduction to these four tools.

(1) Editor

The editor in Linux is similar to the word and notepad in windows. It completes the editing of the entered text. The most common editors in Linux are VI (Vim) and Emacs. They are powerful and easy to use and are widely liked by programmers.


Compilation process

(2) Compile the linker

Compilation refers to the process of converting source code to generate executable code, as shown in.

It can be seen that the compilation process is very complex, including lexical, syntax and semantic analysis, intermediate code generation and optimization, symbol table management, and error handling. In Linux, the most common compiler is the GCC compiler. It is a multi-platform compiler launched by GNU with powerful functions and superior performance. Its execution efficiency is 20% higher than the average efficiency of general compilers ~ 30% is one of the representative works of GNU.

(3) Debugger

The debugger is not a necessary tool for code execution, but intended for programmers to conveniently Debug programs. Readers who have programming experience know that in the programming process, debugging usually consumes much more time than coding. Therefore, a powerful and easy-to-use debugger is essential. GDB is a debugger used by most Linux developers. It allows you to easily set breakpoints and single-step tracking to meet developers' needs.

(4) Project Manager

In Linux, the Project Manager "make" is similar to the "Project" in Visual C ++ in windows. It is a tool for controlling or repeatedly compiling software. In addition, it can also automatically manage the content, methods, and timing of software compilation, so that programmers can focus on code compilation rather than source code organization.

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.