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

1
vote
1answer
2k views

How to solve the link library problem -lgcc_s

I am trying to compile a script with GCC on my Ubuntu system and get this error: /usr/bin/ld: cannot find -lgcc_s How can I fix this problem?
1
vote
2answers
5k views

Installing missing package that provides Xm/Xm.h

I'm compiling a software package that requires a header file. The header file is missing from my Ubuntu 11.10 (64-bit) installation. During the compilation using make, gcc and gfortran, I receive ...
1
vote
2answers
4k views

How to cross-compile programs for the Raspberry Pi with gcc?

I am fond of using gcc to compile small little C and C++ programs on my main computer. However, I also have a Raspberry Pi, and, being a 700-MHz single-core computer, I would prefer to not have to do ...
0
votes
2answers
353 views

How can I install dpkg-dev without installing gcc 4.6?

I have manually installed gcc/g++ 4.7 on my Ubuntu 12.04 When I run sudo apt-get install dpkg-dev it's trying to download and install g++ 4.6 which would obviously break 4.7. How can I install ...
2
votes
1answer
6k views

GCC compiler errors with “No such file or directory”

My Ubuntu version is 12.04 LTS. I have written some C programs. But there is a compiler-problem. I've googled and found that I need build-essential. So I download and installed it. After ...
4
votes
1answer
816 views

How to build a particular version of gcc (4.5.1)?

In my office we have gcc-4.5.1, with that version my c++ project works fine. If I compile the same project at home with Ubuntu 12.04 with gcc-4.6, I have lot of errors and I couldn't compile at all. ...
2
votes
1answer
9k views

How to install gcc 4.6.3 on 12.10?

I want to install a previous version of gcc to make Intel compilers work correctly. Can I use apt-get to install? If so, which repository should I use? Any help is appreciated.
1
vote
0answers
3k views

GCC 4.8 Installation? [closed]

What is the best way to install GCC 4.8 in Quantal Quetzal (12.10)? I am trying to explore it's improved diagnostic messages and compare them to Clang, so 4.7 will not do. gcc-snapshot from the ...
1
vote
1answer
376 views

Differences in compiling between gcc 4.4 and gcc 4.6?

I just moved from RH (CentOS 6) with gcc 4.4.6 to Ubuntu 12 with gcc 4.6.3. I have a program that references a third party library. I have successfully build and installed the library on the Ubuntu ...
0
votes
1answer
400 views

C programming on Ubuntu

I have problems related to C programming on Ubuntu 12.04. While compiling C program consisting pow I faced difficulties. Then I searched the Internet and got the solution with -lm. But that's the ...
0
votes
3answers
2k views

Error linking standard header file in gcc

I've a simple code - this works on other platforms but does not work in ubuntu. #include <stdio.h> #include <stdlib.h> int main() { int x=99; char str[100]; itoa(99, str, 10); return 0; } ...
0
votes
0answers
27 views

How do I install the latest GCC etc on 10.04? [duplicate]

Possible Duplicate: How to update gcc to the latest version(in this case 4.7) in Ubuntu 10.04? So, basically I want to still have GNOME 2 because I need a theme for it (Mac OS X like theme) ...
2
votes
1answer
5k views

Why do I get “undefined reference” errors when linking against OpenSSL?

My compilation process throws around errors like ..undefined reference to `BN_cmp' although I include <openssl/bn.h> and run gcc -lssl -lcrypto test.c -o test can someone help? (openssl ...
0
votes
1answer
179 views

Erased gcc4.6… shouldn't have

So... after isntalling gcc4.7, I found I had gcc4.5, 4.6 and 4.7. After configuring alternatives, when typing gcc --version it said it was 4.7, but I was not sure that Qtcreator were using the right ...
1
vote
1answer
713 views

Having 2 versions of gcc

I have just installed gcc 4.7 from ppa repository. Ubuntu 12.04 already comes with 4.6. When I use command: gcc --version It tells me it is 4.6.3 to be exact. I have no idea of how to launch the ...
1
vote
0answers
1k views

How do I install GCC 4.7.1 on 12.04?

It so happens that I hit a bug in Ubuntu's GCC 4.7.0, which has been fixed in later versions of GCC; I believe it's already fixed in 4.7.1. I can always download the source, compile and install it, ...
1
vote
0answers
253 views

setting permission for executable file output of gcc [duplicate]

Possible Duplicate: How to 'chmod' on an NTFS ( or FAT32 ) partition? Can't make a file executable i m pretty new to linux and gcc. i have a file1.s file which i tried to ...
1
vote
1answer
4k views

Problems with libconfig PKG_CONFIG_PATH enviroment variable

I've coded a project with some files in C. To make it easy for the user to start the program I started to generate a cfg-file. For this reason I installed libconf. Unfortunately on compiling with a ...
1
vote
0answers
614 views

How do I install/compile CORSIKA & FLUKA for 32-bit Ubuntu 12.04?

I want to use some programs (CORSIKA and FLUKA) which are essentially designed for 32 bit systems. I've installed the 32-bit version of 12.04 on my system (Intel® Core™ i7-2700K CPU @ 3.50GHz × 8). ...
4
votes
1answer
13k views

How to use GCC 4.7 in place of 4.6?

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 ...
2
votes
0answers
295 views

gcc 4.3 not in repository anymore?

matlab has been so nice not to update its supported compilers. The latest version supported that supports the so-called mex-files is gcc-4.3.4. Now, this version also seems to be deleted from the ...
2
votes
4answers
2k views

.exe file created by C programming through gcc compiler isn't executing

I am using Ubuntu 12.04 on my desktop and Ubuntu 11.04 on laptop. I am writing c program which contains math. I am creating executable file through the command: gcc -o filename.exe filename.c -lm ...
1
vote
1answer
2k views

/bin/sh: 1: arm-linux-gnueabi-gcc: not found

I'm working on eclipse indigo on Ubuntu 12.04. And I'm trying to cross compile so I downloaded gcc-4.4-arm-linux-gnueabiarm-linux-gnueabi-4.4 and I changed the C/C++ Build setting and I added includes ...
0
votes
4answers
2k views

How do I enable a Buffer Overflow?

I just installed 12.04 (WUBI actually) and I wanted to learn a bit about buffer overflow. Unfortunately when I try to use a function like puts() and gets() in an incorrect manner (that is, to cause a ...
1
vote
1answer
5k views

How to install gcc-4.4.6?

My computer has Ubuntu 11.10 32-bit OS. I downloaded gcc4.4.6 core package (tar file), unzipped it and tried the following: ./configure sudo make install which gave me the following error: ...
3
votes
2answers
524 views

Using 12.04, can I compile packages with gcc for 10.04?

My development machine is running Precise, but some of my target servers are still running Lucid. I'm trying to set up my dev machine so that it can compile c/c++ for both Lucid and Precise. I already ...
1
vote
2answers
7k views

How to upgrade g++ to 4.7.1?

Richard Holloway's answer to this thread nicely explains how to upgrade from 4.6.3 to 4.7.0 (on 12.04, in my case) but I would like to upgrade to 4.7.1, which has been available for awhile. However ...
1
vote
2answers
689 views

Why does “pkg-config” print only a blank space with the “--cflags” option?

I installed libcurl using :sudo apt-get install libcurl4-openssl-dev. When I try to compile my program I read that we have to pass where libcurl is located to the GCC compiler(although for me its ...
2
votes
1answer
932 views

Why is the GCC 4.7 PPA not upgrading to 4.7.1?

I would like to install from repository (without compilation from source) the latest g++ 4.7.1 on Ubuntu 12.04. I know I can install g++ 4.7.0 according to this tutorial. I have also found the g++ ...
3
votes
2answers
3k views

Can not compile any C code under Xubuntu

I am not a seasoned C programmer, but I compile some C code sometimes. The last time I successfully compiled and run some C code I did it on the same system that I have now (the very same OS on the ...
6
votes
1answer
2k views

Why can't I compile GLIBC on Ubuntu 12.04?

I'm trying to compile the Linux From Scratch kernel, version 7.1 on Ubuntu 12.04, running inside of a virtualbox. I've worked through a part of the tutorial successfully, but when I reach Step 5.7: ...
4
votes
4answers
3k views

How do I install ALL development libraries?

I want to preinstall all the libraries one could ever need onto a system so someone building something would always have the libraries available. Like in a computer lab where users are not root. I ...
4
votes
2answers
1k views

Are libc versions tied to kernel versions?

After reading the answers to my previous question I have come to the conclusion that an answer to the following question is what I was actually looking for: Does a particular version of the kernel ...
3
votes
3answers
1k 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 ...
2
votes
1answer
2k 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 ...
0
votes
1answer
1k 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 ...
2
votes
1answer
1k views

A question about “add-apt-repository”(gcc 4.7 or bumblebee)

I installed Ubuntu 12.04 in my notebook and I use C++. I want to use C++11, so I want to upgrade my gcc to gcc-4.7. I ran these commands: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo ...
1
vote
1answer
7k views

fatal error: avr/io.h: No such file or directory compilation terminated

how to load avr/io.h header files in the gcc compiler..im using 12.04 version of Ubuntu.. wen ever i run a AVR program this kind of error is generating " fatal error: avr/io.h: No such file or ...
15
votes
2answers
123k 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) ...
1
vote
1answer
3k views

How to install a specific gcc version?

I'd like to install an older version of gcc on my Ubuntu Lucid machine. Particularly, I am interested in 2.95.3 or 3.0.2. Is there any repository to download this package with the apt-get command?
-1
votes
2answers
460 views

How do I create a deb for GCC 4.7?

I'm sorry but I have tried the tutorials on various websites. Nothing, so far, has worked. I'm using Ubuntu Maverick 10.10. I've downloaded, compiled and installed GCC 4.7.0. Now I want to make a .deb ...
0
votes
1answer
3k views

How to edit makefile?

I want to add -std=c99 flag to make command but I have no idea how to do it. Where is related file located? @Andrejs Cainikovs But I have not found related file or files yet.
-1
votes
2answers
2k views

How to downgrade gcc to version 4.1.1 if I use Ubuntu 11.10 or 12.04 64-bit?

It may seems simlar to this question: Old version of gcc for new Ubuntu but I can't solve it with the method provided in that thread I get some error like gcc-4.1 : Depends: cpp-4.1 (= ...
0
votes
2answers
547 views

Which version of OpenMP implements gcc 4.5?

I am using Ubuntu 11.04. I have installed the compiler gcc 4.5 by using the command sudo apt-get install gcc 4.5 in terminal. Now I need the command to enable OpenMP. Is it gcc -fopenmp foo.c ? ...
0
votes
1answer
4k views

gcc compiling error for c++ program

When I'm trying to compile a C++ program with gcc, it gives me following error: gcc: error trying to exec 'cc1plus': execvp: No such file or directory error: command 'gcc' failed with exit status 1
0
votes
1answer
612 views

Cross compile packages, question regarding armhf dependencies

I'm attempting to cross compile a couple Ubuntu Precise Packages, My current arch is amd64 my target is armhf. I have the correct cross compile GCC toolchain installed, I have correctly utilized the ...
1
vote
1answer
3k views

How to link with libcurl on Pangolin

Since Pangolin, I can't manage to link any program with libcurl, even the example provided with libcurl themselves. I have installed libcurl: sudo apt-get install libcurl4-gnutls-dev Then as the ...
1
vote
3answers
549 views

Is gcc portable between all 64 bit linux machines

I'm doing work remotely by connecting to a Linux terminal with ssh. The machine I'm connecting to is a 64 bit x86 Linux machine. My computer is also 64 bit Ubuntu machine with an x86 processor. I ...
2
votes
1answer
3k views

Ubuntu 12 breaks gcc 4.7 build from source

I use C++11 extensively, so right after installing the new Xubuntu 12.04 LTS release, I went to build gcc from source. After getting the required dependencies using sudo apt-get build-dep ...
2
votes
2answers
6k views

gcc -m32 cannot find libraries

Both 32 and 64 bit compiles worked and then I upgraded from 11.10 to 12.04. Now -m64 works but -m32 can't find libraries. I've tried reinstalling libraries, and gcc-multilib but no joy. Anyone spot ...