C++ 17 compiler not installed

workspace

#1

I’m trying to run g+±6 invoke.cpp -std=c++1z from https://www.youtube.com/watch?v=z-kUhwANrIw
for 2017 features. It doesn’t seem to be installed .

  1. Is it installed somewhere I’m not looking?
  2. is there a way to install gcc-6 ? the current version is 4.8.4

#2

Hi there,

It’s probably not installed as the default os is something like 2-3 years old (Ubuntu 14.04). Thankfully there is an APT repo set up that contains newer version of the GCC software.

Try doing:

sudo apt-get update
sudo apt install gcc-6

After a few minutes you should be able to type:

emarcotte:~/workspace $ gcc-6 --version
gcc-6 (Ubuntu/Linaro 6.3.0-18ubuntu2~14.04) 6.3.0 20170519
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO