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.

learn more… | top users | synonyms

45
votes
4answers
75k views

How to install gcc-4.8 in Ubuntu 12.04 from the terminal

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 ...
4
votes
7answers
4k views

Can I use a C/C++ compiler?

I shifted to Ubuntu 10.10 now I am facing problem to have C/C++ compiler. What are the possible ways so that I can use C/C++ compiler using all the libraries (like graphic, math, conio, stdlib, etc) ...
31
votes
3answers
54k views

Choose 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 ...
5
votes
4answers
16k views

Old version of gcc for new Ubuntu

Is there a repository containing packages for old versions of gcc, for the latest Ubuntu. I want to install gcc3 alongside gcc 4, for programs that need gcc3 specifically.
33
votes
4answers
57k views

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 ...
16
votes
3answers
29k views

How to update gcc to the latest version(in this case 4.7) in Ubuntu 10.04?

I have Ubuntu 10.04 32-bit with gcc 4.4.3 currently installed on it. I want to upgrade it to gcc/g++ 4.7 (I am looking for C++ 0x support) How to update using Ubuntu Package Manager: apt-get ...
9
votes
1answer
8k views

Cross-Compile for ARM?

How do I set up GCC for cross compiling for the ARM processor? The host would be on x68 ( AMD64 - Ubuntu 12.04 ) and the target would be ARM ( Raspberry Pi as well as Pandaboard - will do separate ...
3
votes
1answer
294 views

How to use multiple instances of gcc?

I have both gcc 4.7.3 and 4.8.1 installed But on running gcc --version I get gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see ...
1
vote
3answers
2k views

Can't install gcc 4.8, dependency issues

I tried downoading 4.8 for 12.04 from https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+packages (I did not find for 13.04 as is mentioned here: How to install gcc-4.8 in Ubuntu 12.04 from the ...
5
votes
5answers
13k views

How do I install gcc-4.3?

Is there and easy way to install gcc-4.3 on Oneiric ? I really need it because matlab depends on i for the creation of mex-files I tried changing all my resopistories back to Maverick just to install ...
2
votes
1answer
1k views

Installing gcc from Kubuntu DVD

I am having a hard time with a Kubuntu 12.04 install that does not have an internet connection. In order to build the ethernet driver, I need gcc. I installed from the DVD, and I have gcc-4.7-base ...
1
vote
1answer
83 views

What gcc version do I need?

I have installed ns-2.28 on ubuntu 12.04. My kernel version is 3.2.0-29-generic-pae. What gcc version matches my ns-2.28 & 3.2.0-29-generic-pae?
1
vote
1answer
209 views

How to install 64-bit libraries on 32-bit system?

I need to cross-compile for 64-bit architecture on a 32-bit platform (using gcc-multilib and -m64 flag). For this I need to install 64-bit versions of the dependent libraries. How do I do that?
11
votes
2answers
96k views

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) ...
3
votes
2answers
10k views

How to use GCC 4.7 in place of 4.6 (Ubuntu 12.04)

So I'm working on a project and I wanted to use some C11 features for C. To use those features GCC 4.7 is required, so I went to synaptic and looked up 4.7, and I found the packages gcc-4.7-base so I ...
5
votes
4answers
5k views

Can't build gcc anymore since upgrade to 11.10

On Monday I've upgraded to from Ubuntu 11.04 (my initial installation) to 11.10 and now I can't build gcc from source anymore. Since I forgot to uninstall the gcc package before the upgrade, Ubuntu ...
6
votes
5answers
12k views

Linking problems after updating to 11.10

Right now I am having difficulties linking a project I am working on with gcc4.6 in ubuntu 11.10. Before the distribution upgrade everything linked fine and it still compiles/links on the other ...
7
votes
3answers
14k views

My program cannot run with “command not found” error

I just switched from Windows to Ubuntu 11.10. I wrote the following code in C with the text editor and saved it as HelloWorld.c in Documents. #include <stdio.h> int main() { printf("Hello ...
4
votes
1answer
2k views

How to speed up compilation of Ubuntu apps (make, cmake, gcc)

I am compiling some programs here and I have 4 cores. Is there a way to tell make, cmake or gcc to compile using all cores or something to that affect.
3
votes
1answer
3k views

How to compile & install Emerald window manager in Ubuntu 13.04 64bit?

Please give me directions to compile & install Emerald specifically in Raring Ringtail 64bit edition. I've tried to compile it from the source many times, but had no luck.(Compile log : ...
3
votes
3answers
860 views

Are gcc versions tied to kernel versions?

Is there any link between gcc versions and the version of a kernel ? Specifically, would I be able to install a very old version of gcc onto the latest kernel. Alternatively would I be able to build ...
1
vote
1answer
4k views

How to install GCC 4.7 on Lubuntu 11.10?

I installed Lubuntu 11.10 and I installed build-essential with this command: sudo apt-get install build-essential Now I have gcc 4.6 I read on some forum that adding the next PPA I'll be able to ...
8
votes
2answers
558 views

Can't compile with GCC on Ubuntu 12.04

I'm trying to compile and run the below C program on my Ubuntu & Windows machines with both GCC & VC9. However, I'm facing below issues: On Ubuntu machine: GCC compiles fine, but when run, ...
7
votes
3answers
13k views

gcc no longer works after upgrade

As an example: hsmyers@ubuntu:~/c_dev$ cat hello.c #include <stdio.h> int main(int argc,char **argv) { printf("Hello World!\n"); return 0; } hsmyers@ubuntu:~/c_dev$ gcc -c -o hello.o hello.c ...
6
votes
2answers
8k views

Ubuntu 13.04 with gcc/g++/gfortran 4.8 by default?

I plan to download and install Ubuntu 13.04 and I would like to have two compilers on my system. First question: what is the version of gcc/g++/gfortran shipped with ubuntu 13.04 ? (is it 4.7.3 ?). ...
4
votes
1answer
200 views

Reverting problems caused by checkinstall with gcc build

I recently downloaded the GCC 4.6.2 source in order to play around a bit with C++11. Having been told about checkinstall and its usefulness in installing programs from source, I created a Debian ...
3
votes
1answer
728 views

Will gcc be upgraded to 4.5.* in one of the 10.04.* releases?

I don't quite understand how the LTS releases work. Will gcc be updated to the newer 4.5 version or will it remain 4.4 and I'll have to wait for 11 before seeing 4.5?
2
votes
1answer
73 views

Error installing SHA

I'm trying to install SHA using the following command perl -MCPAN -e 'install Digest::SHA' I also tried using: sudo cpan 'install Digest::SHA' But i'm getting a linker error: ...
2
votes
1answer
1k views

error in installation of gcc on ubuntu Ubuntu 12.04

I want to install gcc on a ubuntu machine but got the following errors: t@lab45:~# apt-get install build-essential Reading package lists... Done Building dependency tree Reading state ...
2
votes
2answers
812 views

gcc Unable to exec gcc.real: No such file or directory

./configure checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/home/mob/freeglut-2.8.0': configure: error: C compiler cannot create executables See ...
1
vote
1answer
75 views

cross compiling error for helloworld program

I have already created the amhello-1.0.tar.gz using this tutorial click to open now am trying to make cross compiling but error occurs. i am following this tutorial click to open after entering ...
1
vote
1answer
84 views

Compiling C source file without .c suffic

Let hello_world be a valid C source file. When I try to compile I get gcc hello_world // hello_world: file not recognized: File format not recognized I know I could rename to have .c suffix, but if ...
1
vote
2answers
2k views

How can i downgrade GCC 4.7.2?

i want to downgrade GCC and G++ 4.7.2 to some older versions, 4.0 perhaps. Any assistance? I'm using Lubuntu ATM.
1
vote
1answer
1k views

How to downgrade gcc from 4.4.4 to 4.2.1?

The newest Ubuntu (10.10) has gcc version 4.4.4, but I need 4.2.1 for compilation issues. The library that I'm using requires me to use 4.2.1. How can I downgrade the gcc to a specific version?
0
votes
1answer
83 views

Header files missing

I'm trying to compile a source code and I'm getting many errors indicating that header files are missing from my system checking sys/ioccom.h usability... no checking sys/ioccom.h presence... no ...
0
votes
1answer
397 views

Bochs Compiling Error AGAIN

I'm trying to compile bochs with this command: ./configure --with-x11 --with-wx --enable-ne2000 --enable-iodebug --enable-disasm --enable-debugger --enable-e1000 --enable-usb --enable-pci it works, ...
0
votes
1answer
518 views

msp430/bin/ld: cannot find -lc

I installed successfully msp430-gcc 4.7.0 compiler. The compiler at the final stage of the linking process it shows me the following error for Ubuntu 12.04. msp430-gcc -mmcu=msp430f1611 ...
0
votes
1answer
808 views

Installing g++ on 8.04

I am running Ubuntu 8.04 (currently I do not have the option to upgrade due to hardware problems). I need to get g++ onto my installation but as this is no longer supported I am unable to use the ...
-1
votes
1answer
436 views

How do I compile lbflow 1.1?

After using "sh ./configure" command, I encountered another error during lbflow package installation (a scientific one). The sequence of operations is here with error: ./configure --disable-gts ...
-2
votes
2answers
52 views

compiling a c++ program

I tried to compile a cpp program through the terminal on 13.04 but got this message: npg@NPG-ideaPad-S210:~$ gcc -o comp-LCG.cpp The program 'gcc' can be found in the following packages: * gcc * ...