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.