Table of contents
1. The use of Linux compiler-gcc/g++
1.1 Background knowledge
Why can we develop C/C++ or other forms under windows or linux? The prerequisite is that our system must install header files and library files related to C/C++ development. So the C/C++ development environment we usually download and install not only refers to VS/gcc/g++, but more importantly, the header files and library files of the language itself. When we download and install software such as VS2019 and select the development package, we are also downloading the header files and library files of the language simultaneously.
Therefore, for compiled languages, when installing the development kit, the corresponding header files and library files must be installed.
1.2 Preprocessing, compiling, assembling, linking
Preprocessing phase:
Compilation phase:
Assembly phase:
Linking phase:
1.3 Dynamic and static links
The essence of the link is to link to the standard library of the language. The standard library of the language is essentially a file with a path.
Advantages and disadvantages of dynamic and static links:
2. Supplementary sudo settings
Under Linux, the permissions of ordinary users will be restricted. Some operations can only be performed by root superusers, but sometimes ordinary users want to temporarily execute a command that only superusers have permission to execute, but they do not want to switch to root Is there any good solution at this time? The answer is yes. That is the temporary privilege escalation command sudo.
The above is what I want to share with you today, have you learned it? If you feel that you have gained something, then pay attention to it carefully, and will continue to update the relevant knowledge of Linux system programming in the future, and we will see you in the next issue! !