C++ Development Setup C++ Development Setup Dev. Setup
Tools
Advice: start with a text editor + command line compiler
But… once you know how the C++ build process works and how to use a compiler on the command line, you should consider switching to an IDE for bigger projects.
Visual Studio Code is probably one of the best choices for beginners today. It has a nice UI, offers some basic IDE features like completion and jumping to definitions and there is even a VIM plugin that is highly configurable.
Visual Studio Code |
editor with some IDE features |
|
VIM |
very powerful editor – takes some learning can be used inside the terminal |
|
Qt Creator |
IDE – quite beginner-friendly | |
Embarcadero Dev-C++ |
IDE – beginner-friendly; quick & painless setup | |
Microsoft Visual Studio |
IDE – can be overwhelming for beginners | |
JetBrains CLion |
IDE – can be overwhelming for beginners |
Windows
If you use Windows 10, I highly recommend using the Windows Subsystem for Linux (WSL) which essentially gives you a full-fledged Linux command line.
Most learning resources, especially in the C++ world assume a Linux environment. If you want to pursue a career in software development you will definitly need to familiarize yourself with Linux anyway.
In case you have never worked with a command line interface you should really start to learn some basics. It doesn't take much to create folders, move/copy/delete files and compile and run your first, simple C++ programs.
Compilers
The default
in the GNU/Linux world and very mature.
Ubuntu / Windows + WSL (Windows Subsystem for Linux)
$ sudo apt install -y g++
$ sudo apt install -y build-essential
Windows without WSL
- WinLibs Project (recommended)
- MinGW Project (outdated as of 2021)
- STL's MinGW distro
- Dev-C++ comes with a bundled gcc (probably the easiest option for complete beginners)
Mac OS X
$ brew install gcc
Ubuntu / Windows 10 + WSL
$ sudo apt install -y clang++
$ sudo apt install -y build-essential
Windows without WSL
Compiler Explorer
- run code through many different compilers
- great for quick tests
- 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, …
- shows nicely annotated assembly code
Wandbox
- run code through different compilers
- great for quick tests
- console input & output window
Comments…