C++ Development SetupC++ Development SetupDev. Setup
Tools
Advice: start with text editor + command line compiler
If you are new to C++ you should start with a text editor and not
with a full-blown IDE.
Once you've understood how the C++ build model works,
what IDEs really do in the background and you want to do larger projects
you can still switch to an IDE.
- Visual Studio Code — modern, cross-platform code editor with some IDE features
- VIM — a classic - powerful, but takes some learning
- Qt Creator — quite beginner-friendly IDE
- Microsoft Visual Studio — IDE (Windows & OS X)
- More Editors…
- More IDEs…
If you use Windows 10, I highly recommend using the Windows Substystem 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.
Install on Ubuntu / Windows 10 + WSL
$ sudo apt-get install -y g++
$ sudo apt-get install -y build-essential
Install on Windows without WSL
Install on Ubuntu / Windows 10 + WSL
$ sudo apt-get install -y clang++
$ sudo apt-get install -y build-essential
Install on Windows without WSL
Compiler Explorer
- lets you 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 output