What is needed to write and compile code from the Linux Terminal?

I am considering taking my first forays into linux and using the terminal to write code rather than using an IDE.

From a fresh installation of debian 8 what things would I need to install in order to write and compile code? I am also curious if any additional steps need to be taken in order to access the Standard Template Library, as many of the things I plan to code would be made easier by accessing it.
Most Linux distributions ship with an (invariably thoroughly obsolete) version of the GNU compiler and toolchain.

There are several tutorials on how to compile, link and run code; for instance:
https://www.cyberciti.biz/faq/howto-compile-and-run-c-cplusplus-code-in-linux/

What the Linux crowd fondly believes is C++ is not standard C++. Unlike what every tutorial suggests, compile your C++ programs with the options -std=c++0x -pedantic-errors -Wall -Wextra
For instance: g++ -std=c++0x -pedantic-errors -Wall -Wextra myprogram.cpp

After you get a little more familiar with the environment, you can install a more recent version of the GNU compiler and/or install the LLVM compiler and library, and change the option from -std=c++0x to -std=c++14
Hi,

A quick Google search found this:

https://www.garron.me/en/bits/debian-development-tools-make-gcc-instalation.html

I am also curious if any additional steps need to be taken in order to access the Standard Template Library, as many of the things I plan to code would be made easier by accessing it.


As long as a compiler like g++ or clang++ is installed, you shouldn't need anything else. All you have to do is #include the relevant header files in your code.

Good Luck !!
Topic archived. No new replies allowed.