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

4
votes
3answers
1k views

How do I compile/run C++ code in the console?

I'm trying to run my C++ code using the console. I used the header file conio.h like I did when I used Turbo C++ IDE in Windows, and I ran the code in console using g++ filename.cpp I have ...
5
votes
3answers
10k views

Cross-compilation issues with GCC/G++

I am using gcc to compile a C++ application on my CI server (http://ci.berboe.co.uk) and as the vps that it is compiled on has the x86-64 architecture I need to cross-compile to get the compiled ...
14
votes
1answer
18k 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 ...
1
vote
1answer
187 views

Restoring gcc and g++ flags

I've recently done something really stupid: I wanted to configure NetCDF libraries using the Intel Fortran compiler and, therefore, I was following instructions for that kind of procedure. ...
1
vote
1answer
356 views

linking cpp object file to c object file and create executable

Suppose i have a c++ file, created an object file and c file created another object file. Now i need to link both into one executable. While i'm trying it is giving errors about c++ not found. Can ...
2
votes
1answer
6k 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 ...
-1
votes
1answer
1k views

what is use of gcc flag -Wall [closed]

can some one help me to understand the use of -Wall flag in gcc? I am working on make file and not able to understand this flag. Thanks, vivek
0
votes
1answer
1k views

error while compiling speech_tools can not find -lcurses

I get the following error when compiling speech_tools. /usr/bin/ld: cannot find -lcurses /usr/bin/ld: cannot find -lncurses collect2: ld returned 1 exit status make[1]: *** [ch_lab] Error 1 make: ...
0
votes
1answer
5k views

apt-get gcc 4.7 multilib

I followed the instructions from @jokerdino here in askubuntu sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.7 But to get a successful ...
1
vote
2answers
11k views

How can I check that GCC is installed correctly?

I have installed GCC with apt-get. How can I check that it is installed correctly and which version?
0
votes
1answer
271 views

Error while compiling c program using gcc <filename.c> thru the CLI

Whenever I try to compile a c program thru CLI using gcc , I get the error: "gcc: error trying to exec 'cc1plus': execvp: No such file or directory". I'm using Ubuntu 12.04. Also, "sudo apt-get ...
3
votes
1answer
344 views

Can't find new.h - getting gcc-4.2 on Quantal?

I've been trying to compile the Valve Source SDK (2007) on my machine, but I keep running into the same error: In file included from ../public/tier1/interface.h:50:0, from ...
0
votes
2answers
1k views

Issue installing *gfortran*

I am trying to installing gfortran on my ubuntu system and I am following the steps mentioned in http://gcc.gnu.org/wiki/GFortranBinaries32Linux , unfortunately one of the step in the installation ...
0
votes
1answer
2k views

Make mex compiler of matlab working on mint?

Mex compiler of matlab does not work with following error Warning: You are using gcc version "4.7.2-2ubuntu1)". The version currently supported with MEX is "4.4.6". For a list of ...
0
votes
1answer
207 views

Can't Compile A Simple C Program

I installed the last version of Ubuntu. I tried to compile and run simple c program. I was get error: fatal error: stdio: No such file or directory I installed and updated gcc compiler few times, ...
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
5k 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
367 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
884 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
10k 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
393 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
415 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
185 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
768 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
281 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
649 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). ...
5
votes
1answer
14k 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
297 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
539 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
733 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
933 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
3k 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
4k 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 ...