Questions tagged [gcc]

The GNU Compiler Collection is the standard compiler system used on many Unix-like operating systems, including Linux. Originally meant for compiling C programs, it can now also handle C++, Java and several other languages.

1230 questions
312
votes
10 answers

How to choose the default gcc and g++ version?

So I have installed gcc-4.4 and gcc-4.3 (same for g++). Now as far as I remember there is a tool in Ubuntu which sets the symlinks for you if you just tell it which version you want. However it does not seem to work in the newest version, which I…
Nils
  • 3,361
183
votes
5 answers

How do I use the latest GCC on Ubuntu?

I want to compile my program with the latest version of gcc. Ubuntu 14.04 comes with gcc 4.8.2, however there's 4.9.0 available, moreover, I see that it is available as a package: gcc-4.9. I tried to install it sudo apt-get install gcc-4.9 but it…
137
votes
9 answers

GLIBCXX_3.4.20 not found, how to fix this error?

Whey I try to run the program Layout Editor (available on this site) on Ubuntu 14.04.1 64-bit LTS I get the following output in the terminal: $ layout layout: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by…
Vesnog
  • 2,283
  • 4
  • 22
  • 36
99
votes
2 answers

How to install gcc-4.8

I checked the gcc version on my system. It is currently at 4.6.3. I read that gcc-4.8 is out. I tried the following commands without success: sudo apt-get install gcc (gcc is already the newest version) sudo apt-get install gcc-4.8 (unable to…
MdT
  • 1,093
83
votes
3 answers

How to cross compile for ARM?

How do I set up GCC for cross compiling for the ARM processor? The host would be on x86_64 ( AMD64 - Ubuntu 12.04 ) and the target would be ARM (Raspberry Pi as well as Pandaboard - will do separate compilations for each)?
haziz
  • 3,067
79
votes
7 answers

Getting + installing gcc/g++ 4.9 on Ubuntu?

How do I install the latest version of gcc and g++? I am using a variety of C++11 and C++1y features; which is why I need this.
A T
  • 2,578
65
votes
2 answers

install gcc-9 on Ubuntu 18.04?

gcc-9 is just released. I was wondering if there is a repository that allows me to install gcc 9 on Ubuntu 18.04 LTS (bionic)? There seems to be repositories supporting disco: https://packages.ubuntu.com/disco/gcc-9-base But I liked to have it on…
tinlyx
  • 3,328
63
votes
3 answers

Install gcc-8 only on Ubuntu 18.04?

I just installed Lubuntu 18.04 LTS. There are two options for installing gcc: gcc-7 and gcc-8. Both are available from apt-get install out of the box. Even after I installed gcc-8, the system is still going to install gcc-7 when I install other…
tinlyx
  • 3,328
58
votes
3 answers

Install gcc on Ubuntu 12.04 LTS

When I try to install gcc on Ubuntu 12.04 LTS Server with apt-get install gcc, I get the following error: The following packages have unmet dependencies: gcc : Depends: cpp (>= 4:4.6.1-2ubuntu5) but it is not going to be installed Depends:…
55
votes
3 answers

"fatal error: openssl/opensslv.h: No such file or directory" compiling mitmproxy

I'm trying to install the mitmproxy package via pip like this: $ sudo pip install mitmproxy It terminates with following error message: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing…
Niklas
  • 711
51
votes
4 answers

How to install clang++?

I'm having trouble getting clang++ to work as I compile my code. Specifically, I'm getting a make: clang++: Command not found error. I've run sudo apt-get install llvm, and also sudo apt-get install build-essential and sudo apt-get update. What do I…
user313944
  • 1,631
  • 2
  • 12
  • 8
50
votes
4 answers

How do I install gcc 4.7?

I wish to install gcc 4.7 so that I can use some c++11 features. I downloaded the source, ran ./configure and was told I needed GMP. Downloaded the code for that, hit ./configure and was told I needed m4. But I already have m4 (least that is what…
soandos
  • 1,175
47
votes
5 answers

how to fix configure: error: C compiler cannot create executables

used ./configure DFLAGS="-03" and this is the config.log checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible…
Mike O
  • 571
  • 1
  • 4
  • 6
47
votes
2 answers

gcc: error trying to exec 'cc1plus' : execvp: No such file or directory

I'm a newbie but adventuresome. I'm tri-booting Windows, Fedora, and Ubuntu 14.04 LTS (all 64). Learning but not using dpkg, apt, and apt-get. Starting to study C++ using Ubuntu (the only one with gcc installed). So on my first attempted compile I…
SailorDon
  • 471
37
votes
2 answers

How can I install and use gcc 6 on xenial?

I wish to test existing software with gcc 6, to ensure that it will work when the transition takes place. How can I install gcc 6? Is there a ppa available? Can I just do a "CC=gcc-6 make" ? Thanks
1
2 3
81 82