Giter Site home page Giter Site logo

wasm's Introduction

CPP_Xmake_Env_Template

​ 适配了VsCode的C++开发容器模板,使用Xake作为构建工具。

特性

  • 自动安装交叉编译工具链(V831)
  • 启用CppCheck作为代码检查工具

快速上手

  1. 安装VsCode

  2. 安装Docker

    • Ubuntu22.04

      • sudo apt update && sudo apt install docker-compose-v2
        
    • Ubuntu20.04

      • sudo apt update && sudo apt install docker-compose
        
  3. 在VsCode中安装Dev Containers插件

  4. 使用Ctrl+Shift+p快速打开命令面板,输入dev container rebuild

1、使用xmake构建程序

  • 构建项目:xmake build
    • 构建生成的文件位于 Build/linux/<Arch>/<Mode>目录下
  • 切换构建模式:xmake -m <debug/release>
  • 切换V831工具链:xmake f -p linux -a armv7 --toolchain=v831-toolchain --cross=arm-openwrt-linux-muslgnueabi-
  • 恢复初始化配置(工具链、构建模式):xmake f -c

2、使用CppCheck

右键需要检查的目录Cpp-check-lint->cppcheck-dir

项目结构

.
├── demo # 用于确认CppCheck是否正常工作的Demo
│   ├── src
│   │   └── main.cpp
│   └── xmake.lua
├── LICENSE
├── README.md
├── xmake.lua # 项目的构建配置
└── xmake-repo # xmake本地包仓库,收录一些xmake-io/xmake-repo中没有的软件包
    └── packages
        ├── c
        │   ├── cgraph
        │   │   └── xmake.lua
        │   └── c-periphery
        │       └── xmake.lua
        ├── h
        │   └── highway
        │       └── xmake.lua
        ├── n
        │   └── ne10
        │       └── xmake.lua
        ├── README.md
        └── z
            └── zbar
                └── xmake.lua

13 directories, 11 files

wasm's People

Contributors

t61230 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.