C++ Tool EcosystemC++ Tool EcosystemTool Ecosystem

Compilers Compile

Offline Compilers Offline

GNU g++
    LLVM clang++

      download page

      Microsoft Visual C++

        Only newer versions are largely conforming to the modern ISO C++ standard(s).

        Intel ICC
          NVIDIA PGI
            Embarcadero C++ Compiler

              bundled with C++Builder

              Oracle C++ Compiler

                bundled with Oracle Developer Studio

                IBM XL C++

                  Online Compilers Online

                  Compiler Explorer

                  • lets you run code through many different compilers
                  • shows nicely annotated assembly output
                  • lots of compilers with lots of different versions, also with experimental features
                  • offers several popular libraries
                  • great text editor with multiple cursors, VIM mode, dark mode, …
                  Wandbox
                  • gcc
                  • clang
                  • C++03 - C++2a
                  • Boost
                  C++ shell
                  • gcc 4.9
                  • Boost 1.55
                  • C++03 - 14
                  IDEone
                  • C++14

                  Debugging Debug

                  gdb

                    the GNU debugger

                    lldb

                      the LLVM project's debugger

                      rr

                        • records program state over time
                        • replay & debug same recording many times
                        • reverse execution
                        • chaos mode for catching intermittent bugs
                        • claims to be faster and more memory efficient than gdb

                        WinDbg

                          does also provide record & replay debugging like rr (here called time travel debugging)

                          gdb Frontends

                          cgdb

                            • runs in the command line
                            • split screen with source code window
                            • shows break points and current instruction
                            • install on Ubuntu/Debian/WSL: sudo apt-get install -y cgdb

                            gdbgui

                            • browser-based frontend for gdb
                            • install via pip: sudo pip install gdbgui

                            DDD

                              • official GNU debugger frontend
                              • The UI is a bit old-fashioned, but it is actually quite usable if you spend some time with it.
                              • install on Ubuntu/Debian/WSL: sudo apt-get install -y ddd

                              WinGDB

                                debugging with GDB in Microsoft Visual Studio

                                Code Analysis Analyze

                                Sanitizers

                                ASAN

                                • g++ -fsanitize=address
                                • clang++ -fsanitize=address
                                • MSVC (as of 10/2019)

                                UBSAN

                                • g++ -fsanitize=undefined
                                • clang++ -fsanitize=undefined

                                LeakSanitizer

                                • g++ -fsanitize=leak
                                • clang++ -fsanitize=leak

                                ThreadSanitizer

                                • g++ -fsanitize=thread
                                • clang++ -fsanitize=thread

                                Stand-Alone Analysis Tools Stand-Alone Tools Stand-Alone

                                valgrind

                                  • code instrumentation framework
                                  • runs program on a VM
                                  • --tool=memcheck leak, invalid read/write detection
                                  • --tool=callgrind runtime profiling
                                  • --tool=cachegrind cache profiling
                                  • --tool=massif heap memory profiling
                                  • integration into various IDEs

                                  Dr. Memory

                                    • dynamic instrumentation (runs on unmodified binaries)
                                    • leak detection
                                    • invalid memory read/write detection

                                    HeapTrack

                                      • heap memory profiler
                                      • annotation of memory allocations

                                      Application Verifier

                                        Deleaker

                                          • memory leak detection
                                          • integration into various IDEs

                                          Profiling & Benchmarking Profile

                                          Profiling Applications Applications

                                          GNU Profiler (gprof)

                                            • ubiquitous
                                            • free software
                                            • some IDEs can present gprof results in a GUI

                                            Intel VTune Amplifier

                                              • free of charge
                                              • GUI & command line interface
                                              • sampling-based profiling
                                              • hardware event sampling for Intel chips
                                              • locks & waits analysis
                                              • memory access analysis
                                              • storage analysis
                                              • integrates with MS Visual Studio

                                              OProfile

                                                perf

                                                  • free software

                                                  Valgrind

                                                  (cachegrind, callgrind)
                                                    • free software

                                                    Apple Instruments

                                                      • part of XCode

                                                      NVIDIA Nsight Compute

                                                      Host:
                                                        • profiling for NVIDIA GPUs (architectures: Paspal, Volta, Turing)
                                                        • supplants NVIDIA Visual Profiler

                                                        DTrace

                                                          • free software

                                                          Optick

                                                            • instrumentation-based and sampling-based profiling
                                                            • GPU counters

                                                            GlowCode

                                                              SmartBear AQTime

                                                                Arm MAP

                                                                  Oracle Performance Analyzer

                                                                    Easy Profiler

                                                                      Benchmarking Libraries / Frameworks Libraries / Frameworks Libraries

                                                                      Google Benchmark

                                                                      • Apache-2.0

                                                                      gperftools (originally Google Performance Tools)

                                                                      • BSD-3-Clause
                                                                      • high-performance multithreaded malloc()
                                                                      • heap checker
                                                                      • heap profiler
                                                                      • cpu profiler

                                                                      Celero

                                                                      • Apache-2.0

                                                                      plf::nanotimer

                                                                      • zlib
                                                                      simple, cross-platform microsecond-precision timer class

                                                                      Build Systems Build

                                                                      GNU Make

                                                                      Quite OK for (very) small projects. Every C++ programmer should know how to use Make.

                                                                      • ubiquitous, portable
                                                                      • a lot of limitations
                                                                      • not very expressive syntax

                                                                      CMake

                                                                      Seems to become the de-facto standard in the C++ world.

                                                                      • available on a lot of platforms
                                                                      • lot of tutorials, resources, etc.
                                                                      • used as project model by some IDEs
                                                                      • can be slow at times
                                                                      • carries a lot of techincal debt
                                                                      • clumsy syntax

                                                                      Bazel

                                                                      • fast, seems to scale well
                                                                      • rather rigid project organization
                                                                      • has many dependencies itself

                                                                      MSBuild

                                                                      • Command-line based build system from Microsoft packaged with Microsoft Visual Studio, but also available as stand-alone application.
                                                                      • XML-based build files
                                                                      • supported by , C++Builder

                                                                      build2

                                                                      • uniform across platforms, no project generation step
                                                                      • supports wildcard patterns
                                                                      • support for C++ Modules
                                                                      • support for cross-compilation
                                                                      • skips recompilation of ignorable changes (comments, whitespaces, etc).
                                                                      • dependency management
                                                                      • no dependencies, only C++ compiler required

                                                                      QMake

                                                                      Part of the Qt Project.

                                                                      SCons

                                                                      • automatic dependency analysis
                                                                      • uses a real programming language (Python) for config files
                                                                      • pretty verbose; even common tasks require a lot of code
                                                                      • can be slow for big projects

                                                                      Premake

                                                                      Ninja

                                                                      Meson

                                                                      FASTbuild

                                                                      Gradle

                                                                      Waf

                                                                      Evoke

                                                                      Fairly new system still under development.

                                                                      GNU autotools

                                                                      My advice: stay away from autotools if you can.

                                                                      Unit Testing Frameworks Test

                                                                      Catch2

                                                                      • BSL-1.0
                                                                      • one header only

                                                                      DocTest

                                                                      • MIT
                                                                      • one header only

                                                                      Boost Test

                                                                      • BSL-1.0

                                                                      Google Test

                                                                      • BSD 3-Clause "New" or "Revised"

                                                                      CUTE

                                                                      • LGPL3

                                                                      QtTest

                                                                      Part of the Qt Project.

                                                                      Mull

                                                                      • Apache-2.0
                                                                      • LLVM-based

                                                                      Bandit

                                                                      • MIT

                                                                      CppUTest

                                                                      • BSD-3-Clause

                                                                      Package Management Package

                                                                      conan

                                                                        • decentralized
                                                                        • build systems: CMake, MSBuild, …
                                                                        • binary packages

                                                                        vcpkg

                                                                          • Visual Studio integration
                                                                          • CMake support
                                                                          • only builds from source

                                                                          Hunter

                                                                            • CMake only

                                                                            Buckaroo

                                                                              • GitHub, BitBucket, GitLab, …
                                                                              • integrates into various IDEs

                                                                              NIX

                                                                                Code Editing / IDEs Edit

                                                                                IDEs

                                                                                Qt Creator

                                                                                  • quite beginner-friendly
                                                                                  • very responsive UI
                                                                                  • has a VIM emulation mode (could be better, but it works)

                                                                                  JetBrains CLion

                                                                                    • lots of features; highly customizable UI
                                                                                    • uses CMake as project model, however recent versions can also use traditional Makefiles
                                                                                    • has a VIM emulation mode (could be better, but it works)
                                                                                    • can be a bit slow for very large projects

                                                                                    Microsoft Visual Studio

                                                                                      Only newer versions of the compiler are largely conforming to the modern ISO C++ standard(s).

                                                                                      Eclipse CDT

                                                                                        • good static analysis & linting
                                                                                        • supports several project build models: fully managed, Makefile-based, …
                                                                                        • setup of compilers can be a bit confusing to beginners
                                                                                        • great VIM emulation with Vrapper plugin
                                                                                        • can be a bit slow for very large projects

                                                                                        Apple XCode

                                                                                          Android Studio

                                                                                            based on JetBrains IntelliJ IDEA which is also the base of CLion
                                                                                              the free community edition includes a (very) small business commercial license

                                                                                              Cevelop

                                                                                                • Eclipse-based IDE
                                                                                                • some unique features regarding static analysis and refactoring, like e.g., visualizing template instantiationsA
                                                                                                • can be a bit slow for very large projects

                                                                                                Kdevelop

                                                                                                  OS X version is experimental

                                                                                                  Oracle Developer Studio

                                                                                                    CodeLite

                                                                                                      CodeBlocks

                                                                                                        OS X version is outdated

                                                                                                        Text Editors

                                                                                                        Visual Studio Code

                                                                                                          nice modern UI, thriving extension ecosystem; origin of the Language Server Protocol

                                                                                                          VIM

                                                                                                            A classic and insanely poweful. Has quite a steep learning curve, but the modal editing paradigm is really worth learning. Only real drawback: once you grok it, you want VIM-style editing everywhere. highly customizable, large plugin ecosystem

                                                                                                            Emacs

                                                                                                              Also a classic; also super powerful.

                                                                                                              Sublime Text

                                                                                                                sleek UI, probably the fastest of all text editors, highly customizable

                                                                                                                atom.io

                                                                                                                  nice UI, customizable, large plugin ecosystem; sometimes a bit sluggish

                                                                                                                  Notepad++

                                                                                                                    A classic in the Windows world. Quite OK, but not as powerful as the other editors in this list.

                                                                                                                    Code Formatters

                                                                                                                    clang format

                                                                                                                      part of the llvm/clang project

                                                                                                                      Artistic Style

                                                                                                                        stand-alone tool

                                                                                                                        Web Tools Web

                                                                                                                        Compiler Explorer

                                                                                                                        • lets you run code through many different compilers
                                                                                                                        • shows nicely annotated assembly output
                                                                                                                        • lots of compilers with lots of different versions, also with experimental features
                                                                                                                        • offers several popular libraries
                                                                                                                        • great text editor with multiple cursors, VIM mode, dark mode, …

                                                                                                                        C++ Insights

                                                                                                                        Source-to-source transformation tool that makes behind-the-scenes compiler magic visible and understandable. Shows the code that clang generates for lambdas, range-based for loops, structured bindings, etc.

                                                                                                                        Quick Bench

                                                                                                                        Benchmark code (using Google Benchmark) and get a nice graphical runtime breakdown. You can choose from various versions of gcc or clang.