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 […]

clang-format and cppcheck automation scripts

Ubuntu installs clang-format and cppcheck# code format automatic adjustment & amp;check clang-format format adjustment Install clang-format: sudo apt install clang-format Generate .clang-format file: clang-format -style=google -dump-config > ~/.clang-format Modify the maximum width of each row, ColumnLimit, to 120. The following is the modified code, which can be saved to the ~/.clang-format file. — Language: Cpp […]

openbmc u-boot vscode clangd read code

openbmc u-boot: environment preparation romulus is an example jagger@jagger-u220402:~/working/openbmc$ . setup romulus Machine romulus found in meta-ibm/meta-romulus Common targets are: obmc-phosphor-image 1. bitbake view jagger@jagger-u220402:~/working/openbmc/build/romulus$ bitbake -s |grep u-boot nativesdk-u-boot-tools 1:2023.07.02-r0 u-boot-aspeed-sdk 1:v2019.04 + git999-r0 u-boot-fw-utils-aspeed 1:v2016.07 + gitAUTOINC + 1ded9fa3a2-r0 u-boot-fw-utils-aspeed-cross 1:v2016.07 + gitAUTOINC + 1ded9fa3a2-r0 u-boot-fw-utils-aspeed-sdk 1:v2019.04 + gitAUTOINC + 66672e5af3-r0 u-boot-fw-utils-aspeed-sdk-cross 1:v2019.04 […]

Under linux (wsl), vscode configuration json file, and .clang-format file

c_cpp_properties.json {<!– –> “configurations”: [ {<!– –> “name”: “Linux”, “includePath”: [ “${workspaceFolder}/**” ], “defines”: [], “compilerPath”: “/usr/bin/g + + “, “cStandard”: “c11”, “cppStandard”: “c++17”, “intelliSenseMode”: “clang-x64” } ], “version”: 4 } launch.json {<!– –> // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: […]

C++ object model experiment (clang virtual function table structure)

Abstract: When I was an undergraduate, I compared the memory layout of msvc, gcc, and clang. It has been 6-7 years ago, and C++11 was still used at that time. Time has passed, and this part, especially memory alignment, seems to have undergone some changes in C++17, so let’s practice the C++ class model again. […]

Painless VSCode+clangd+lldb+cmake configures C/C++ development environment

Foreword In C/C++ development, if you use vscode as the development platform, I believe everyone will install the C/C++ extension. When developing on a remote machine, the C/C++ extension provides automatic completion, etc. The function is always slow, which makes me feel very uncomfortable. After a while, I can’t stand it. clangd may be a […]

Clang format format options

Configure styles in code When using the clang::format::reformat(…) method, the format will be specified by the clang::format::FormatStyle framework. Configure formatting style options This section lists the supported options. Each operation has a specified type. Possible values of an enumeration type, specified by a C++ enumeration (a precompiled one, for example: LS_Auto) and a value in […]

The clang plugin runs independently and quickly develops templates (llvm15)

clang-plugin-testAlone github clang-plugin-testAlone gitee The following takes the position of the semicolon at the end of each statement (Stmt) as an example //file: TestAloneMain.cpp #include “clang/Frontend/FrontendActions.h” #include “clang/Frontend/CompilerInstance.h” #include “clang/AST/ASTConsumer.h” #include “clang/AST/ASTContext.h” #include “clang/AST/Decl.h” #include “clang/AST/DeclCXX.h” #include “clang/AST/DeclVisitor.h” #include “llvm/Support/raw_ostream.h” #include “clang/Basic/TargetInfo.h” #include <clang/Frontend/TextDiagnosticPrinter.h> #include <clang/AST/RecursiveASTVisitor.h> #include <clang/Rewrite/Core/Rewriter.h> #include <iostream> using namespace clang; class Util […]

clang compiler front-end analysis

clang compiler front-end analysis clang’s python interface tutorial (2) Python interface clang parses C language AST abstract syntax tree clang static analyzer source code analysis Clang static code analysis is a point that clang can attract more attention compared to gcc, especially the checker-based architecture of clang static code analysis is different from most static […]

VSCode + clang-format

VSCode enables code style correction 1. Open Settings 2. Set Clang_format Search clang_format related configuration Set clang_format basic style In the basic style, both LLVM and Google are indented to 2, so you need to customize the style. Set the path of clang_format custom style file Specify the path of the custom split file (XXX\.clang-format). […]