Code Monkey home page Code Monkey logo

vscode-makefile-template's Introduction

VSCode Makefile Template

A simple C++ Multi-file VSCode project template based on Makefile.

一个基于Makefile的简易C++多文件VSCode工程模板。

文件结构 File Structure

主代码文件为main.cpp,其他的头文件和源代码文件放在include和src文件夹下

生成的可执行文件名称和主代码文件相同,和主代码文件在同一个目录。

在include和src添加文件不需要对Makefile做任何修改

注意:这是个C++模板,默认不编译.c文件。如果需要纯C工程模板,将Makefile中SRCOBJ变量里的.cpp替换为.c即可

使用 Usage

mingw项目中的make叫做mingw32-make,需要复制一份重命名为make

  • 在主文件main.cpp使用code-runner可以直接编译运行
  • 按F5可以Debug(注意要选择使用make的调试)
  • 如果需要修改主文件名称,则应修改Makefile的BIN变量和launch.json中的program字段
  • 如果使用Clangd,那么make cb_gen可以生成compile_commands.json

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.