gocpp logo

Your quickstart to C++ projects

With a single command, Go C++ sets up:

  • A CMake-based C++ project
  • Package management using CPM
  • Formatting using clang-format
  • Compile-time checks using Cppcheck and clang-tidy
  • Code-hardening flags enabled, as recommended by the OpenSSF
  • Flags that enable runtime memory error detection using AddressSanitizer

The generated project is cross-platform and uses a modern C++ standard.

  • Windows
  • macOS
  • Linux (apt)
  • Linux (dnf)
Windows cmd >
curl.exe -s https://raw.githubusercontent.com/cemderv/gocpp.dev/refs/heads/main/new.py | python

Requirements

git

winget install -e --id Git.Git

Visual Studio

winget install --id Microsoft.VisualStudio.2022.Community --override "--add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended --focusedUi --wait"

Or via visualstudio.com.

python3 -c "$(curl https://raw.githubusercontent.com/cemderv/gocpp.dev/refs/heads/main/new.py)"

Requirements

First, install Homebrew.

Then install Xcode.

And lastly:

Shell >
brew install git cmake ninja pkg-config cppcheck
Bash >
python3 -c "$(curl https://raw.githubusercontent.com/cemderv/gocpp.dev/refs/heads/main/new.py)"

Requirements

Development tools:

Bash >
sudo apt install git cmake ninja-build build-essential pkg-config clang-format clang-tidy clang-tools
Bash >
python3 -c "$(curl https://raw.githubusercontent.com/cemderv/gocpp.dev/refs/heads/main/new.py)"

Requirements

Development tools:

Bash >
sudo dnf install git cmake ninja-build gcc-c++ pkg-config clang-tools-extra cppcheck

Learning Resources

If you’re a beginner and want to learn C++, a recommended resource is learncpp.com.

A good C++ standard library reference is available at cppreference.com.

The C++ Weekly video series by Jason Turner offers interesting insights into various C++ features.

Feedback

The script’s source code is available here.

If you’ve encountered an issue or have suggestions and feedback, feel free to contact me.