Welcome to my CPP and C extension ! 🚀🚀🚀
This extension allows you to build your cpp or c projects. Your project can contain an infinite amount of files and my extension will automatically find them all.
You can add include paths, librarys paths, librarys names, preprocessors, and ignore paths which will be ignored in the build.
You can specify an application type. It can either be an executable, a dynamic library or a static library (exe, dll, slib). Dll only works with g++!
You can build in both debug mode and releade mode.
You can simply switch between debug and release in the settings file. It will use the -O3 optimisation level by default. if you want to specify a custom level,
You can simply specify it like this -> build: Release-LEVEL -> The LEVEL is where you put the flag.
Do not add "-O" before, simply specify the name like 1, 2, 3, fast,g.
List of all the available flags : https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Debug exposes the code to the gdb debugger and enables debugging features such as breakpoint and others.
Release mode optimizes and reduces your application size when possible. This mode should only be used when the project is ready to be published
One of the best features is the compilation history. It's a file that allows this extension to decide wich file to compile and which file not to compile making the build time faster.
And Finally, this extension compiles your files in parallel (asynchronously), which makes the build time even faster.
You need a compiler added to the path in terminal. Can either be g++ or clang++. If you decide to use clang++, you need to have msvc installed on windows.
if you want to add colors to the output, download Output Colorizer.
name: "app" #Do not put any space in the name
application_type: "exe" # exe, dll, or slib
cpp_version: "auto"
build: "Debug" #Debug or Release
showSteps: true
include:
- exemple
library_directory:
- exemple
library:
- exemple
preprocessor: # You can add preprocessors -> NAME and preprocessors with values -> NAME,VALUE
- exemple
ressources: # The ressources are folders or files that will be copied into the out folder
- exemple
ignore:
- exemple
1: When including header files in your cpp files, please take note that the files that you expect to change in the future (your custom header files for example ) need to be surrounded by ' " " ', while third party header files or just files that are complete need to be surrounded by ' < > '. This is very important since this extension uses the included files surrounded by ' " " ' as well to determine if a cpp file should be compiled or not.
2: Your app name in the settings and your folder name needs to be attached, no space
3: The paths in the settings file needs to start from the root of your project.
-'CPP_ : Compile project' -> This builds the executable for your project
-'CPP_ : Recompile project' -> this deletes the compilation history and rebuilds your project from scratch
-'CPP_ : Run project' -> Automatically finds the executable file and runs it
-'CPP_ : Configure project' -> This creates the folders and the files necessary for the extension to work.
You can also use the quick access buttons availabe in the status bar: