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

9
votes
2answers
767 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, ...
2
votes
1answer
2k views

GCC 4.8 / MINGW W64 4.8

There is a PPA where I can find these packages for 12.04? Also a build script will do the job! I've tried to download it from sources but the dependencies are a mess. I'd like to start porting my ...
4
votes
3answers
7k views

How to fix compilation errors that mention “stray ‘\342’” and “stray ‘\200’”?

I wrote this program: #include<stdio.h> int main() { printf(“Hello World\n”); return 0; } I saved it as first.c and tried to compile but receiving this problem I have installed even gcc ...
64
votes
4answers
132k views

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 ...
3
votes
1answer
510 views

Use Old GCC Version

I've been trying to get an old version of GCC for my Ubuntu but I can't find any working way to achieve that. I'd like to use the version 4.1.2 of GCC, and I currently got the 4.7.2. How may I ...
2
votes
1answer
372 views

Errors while compiling allegro library program on gcc

I've tried installing allegro library on my system.I didn't get any error while installing the library, but it seems that something went wrong while installation. My code along with the errors I'm ...
6
votes
1answer
3k views

Building webkit from source

I tried to install the webkit applicaion from sources using this manual: https://help.ubuntu.com/community/WebKit When I type: ./autogen.sh --prefix=/usr the following error occurs: checking for ...
6
votes
3answers
10k views

How to activate gcc 4.7 version?

I have gcc 4.6.3 installed: gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 I have installed newer version: apt-get install gcc-4.7 But i still get result "gcc 4.6.3" when I type gcc ...
2
votes
1answer
3k 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
0answers
112 views

gnudialer Make Problem [closed]

I am trying to build gnudialer. I followed these steps to the T. Now on the last step, making the gnudialer, I get this error: dispo.h:71:1: warning: deprecated conversion from string constant to ...
0
votes
3answers
1k views

Error while installing tiff-4.0.3

I get the following errors while installing tiff-4.0.3: pranav@pranav-Inspiron-1545:~$ cd dependency/ pranav@pranav-Inspiron-1545:~/dependency$ tar -xvf libtiff4-3.6.0-5.tar.bz2 usr/bin/cygtiff4.dll ...
0
votes
1answer
349 views

Scanalyze install

I am trying to install Scanalyze. I downloaded the source code, and in the compilation instructions for Ubuntu, he has mentioned that for later versions of gcc (mine is 4+), there is a separate ...
1
vote
2answers
187 views

gcc or cc no longer seems to work in 12.04 lts

I recently installed 12.04 LTS and I would like to compile short c programs. When I enter gcc or cc at the command promp to compile a simple test program "test.c"I get the following: test.c: In ...
1
vote
1answer
91 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?
2
votes
2answers
2k 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
2answers
5k views

gcc and g++ are installed but ubuntu says they are not installed

I have installed g++ and gcc from repository on ubuntu 12.04 ad you can see that they are indeed installed mahmood@pc:~$ dpkg -l | grep gcc ii gcc-4.4 4.4.7-1ubuntu2 ...
10
votes
1answer
1k views

How can I get GCC 4.7 installed on Precise?

The latest version of GCC in the Precise archives is 4.6.3. However, GCC 4.7 adds support for some newer C++11 features (like delegating constructors). Quantal's package archives have GCC 4.7.2 ...
5
votes
3answers
33k views

cannot find crti.o: No such file or directory

When I want to make gcc 4.1.2 (ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.1.2/gcc-4.1.2.tar.bz2) on my ubuntu 12.04 (x86_64). The current active gcc is 4.6.2. I did: ...
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
11k 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
22k 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
195 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
396 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
2k 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
13k 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
290 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
363 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
224 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
6k 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
380 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
7k 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 ...
5
votes
1answer
954 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
403 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 ...
1
vote
1answer
439 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
6k 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
189 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
825 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
311 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 ...