kikeEsteban / boiling-CPP-VC

Example and docs for CPP development with Visual Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create basic C++ project with CMAKE and VSCode

Source: Visual Code CMake Tutorial

Prerequisites

  • C++ Compiler and debuger: gcc and gdb
  • C++ builder: make All this programs installed with sudo apt-get instll build-essential gdb
  • Add VS plugins C++ and CMake from Microsoft

Creating Hello World program

  • To open command pallete: Ctrl+Shift+P
  • Command cmake:config to specify compiler
  • Command cmake:quick to generate base project
  • Command cmake: Select Variant to select build type between:
  • Debug: disables optimizations and includes debug info
  • Release: Includes optimizations but no debug info
  • MinSizeRel: Optimizes for size. No debug info.
  • RelWithDebinfo: Optimizes for speed and includes debug info.
  • Command: cmake: Build to build project for selected target
  • Use breack points and click on Debug action to control the program flow

Mode info:

About

Example and docs for CPP development with Visual Code


Languages

Language:CMake 74.8%Language:C++ 25.2%