General C++ Project Template Directory. It is meant to be configured according to specific projects later on.
- MinGW-W64-builds
- C++17 or newer.
- VS Code(Optional) for pre-provided build/run tasks.
src/
- Contains the main application source code.*.cpp
: General source code file.
include/
- Header files of static libraries/other source code files are placed here.*.hpp
: Any general .hpp file.
lib/
- Static archive libraries are placed here.*.a
: Any general .a file.
bin/
- Where compiled executables are generated.main.exe
: Executable file generated from main.cpp.*.exe
: Any general Executable.
tests\
- Contains source code files related to testing/other demos.*.cpp
: General test source code file.
assets/
- Media and other resources used by the application are stored here.*.jpg
- General .jpg file.*.ttf
- General .ttf file.
.vscode/
- VS Code Configuration files.tasks.json
: Defines build and run tasks for VS Code.
.gitignore
- Specifies to Git, which files/folders to not track.README.md
- Contains Description of project.
- Open the project directory in VS Code.
- Go to
Terminal
->Run Build Task
. - Output executable will be
bin/*.exe
.
cd projectDirectory/
g++ -std=c++17 -static -Iinclude -Llib src/main.cpp -o bin/main.exe
Make sure that mingw-w64/bin
is included in the PATH
so that g++
is available in the cmd. Otherwise navigate manually.
- Open the project directory in VS Code.
- After building, Go to
Terminal
->Run Task
->Run
to run the compiled program. - The
Build and Run
task combines building and running in sequence.
Navigate to the project root directory and run the executable from the bin/
directory:
.\bin\main.exe
Or, for test executables:
.\bin\window_test.exe
lib/
tests/
assets/