[Linux] Station 8: Use of gcc and g++

Article directory 1. Solve the problem of sudo command 2. Linux compiler-gcc/g++ 1.Usage of gcc 2.Usage of g++ 3. gcc compilation and linking process 1. Preprocessing 2. Compile (generate assembly) 3. Assembly (generating machine-readable code) 4. Link (generate executable file or library file) 5.The meaning of some options 4. Library 1. Some knowledge about libraries […]

Linux development tools-gcc/g++

Table of Contents 1. Background knowledge 2.gcc/g++ installation 3.Usage of gcc 3.1 Directly form an executable file 3.2 Preprocessing 3.3 Compilation 3.4 Assembly 3.5 Links 1.Background knowledge The process of program translation goes through 4 stages, and each stage has its own tasks: 1. Preprocessing: remove comments, replace macros, expand header files, conditional compilation, etc. […]

The use of Linux friend book compiler gcc/g++

1. Program translation process In C language, we have already learned the compilation and linking of programs. Here we will review what we have learned before and introduce the subsequent content of gcc/g++. Translation process of 1.1 program Preprocessing (header file expansion, comment removal, macro replacement, conditional compilation) Compile: Turn C into assembly language Assembly: […]

『Linux – gcc / g++』c program translation process

Article directory Preface Preprocessing-E Compile -S assemble -c Link Dynamic and static links Foreword Every program in the computer is changed from code, but in fact, the code written in c/C++ cannot be recognized by the computer, and it must go through a process A series of processes can enable this code to be successfully […]

Linux tool compiler gcc/g++ use | dynamic and static libraries | use of make/makefile

Table of Contents Program compilation 1. Preprocessing (header file expansion, conditional compilation, macro replacement, comment removal, etc.) 2. Compilation (C language assembly language) 3. Assembly (assembly -> relocatable target binary file, not executable, bin.obj) 4. Link (merge our own .obj files and library files to form an executable program) static library dynamic library Why can […]

26 | Easylogging++ and spdlog: two useful logging libraries

In the previous lecture, I introduced two libraries that can be used for unit testing in C++. Today, similarly, I introduce two practical logging libraries, namely Easylogging++ and spdlog. Easylogging + + In fact, I originally wanted to introduce only Easylogging++. But when checking its GitHub page, I discovered a problem: it has basically not […]

[Linux Growth History] Linux Editor-gcc/g++ Use

Blog homepage: Blogger link This article was originally created by M malloc and first published on CSDN Recommended learning columns: LeetCode question set, database column, elementary data structure Welcome to like Collect ?Leave a message Please correct me if there are any errors! The future is very long, and it is worth our efforts to […]

Cross-compiler naming rules and detailed explanation (arm/gnu/none/linux/eabi/eabihf/gcc/g++)

When engaging in embedded development under Linux systems, a cross-compiler is definitely an essential tool. When used in many situations, you will see various compilation tools, such as: arm-linux-gcc arm-linux-gnueabi-gcc arm-none-linux-eabi-gcc arm-none-symbianelf-gcc arm-none-uclinuxeabi-gcc arm-none-linux-gnueabi-gcc arm-cortex_a8-linux-gnueabi-gcc mips-malta-linux-gnu-gcc Do you know why these compilation tools are called so, what their respective meanings are, and in what situations […]

carla make PythonAPI error: The C++ compiler “/usr/bin/clang++-10” is not able to compile a simple test

System: ubuntu20.04, carla version: 0.9.14 When installing carla, run the command makePythonAPI The complete error message is roughly as follows: Check for working CXX compiler: /usr/bin/clang + + -10 — broken CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message): The C++ compiler “/usr/bin/clang + + -10” is not able to compile a simple test program. It fails with […]

Using g++ and Makefile to compile C language programs based on Linux (Ubuntu) system

Using g++ and Makefile to compile C language programs based on Linux (Ubuntu) system Preface 1. Install Ubuntu Introduction to Ubuntu Ubuntu installation steps After installation, enter the system 2. Compile using g++ Install g++ Write a program and compile and run it The difference between g++ and gcc Experimental case Experimental requirements experiment one […]