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
1answer
2k views

collect2: error: ld returned 1 exit status

I want to install nexalign (can be downloaded from here) on ubuntu 13.10. I previously installed it on ubuntu 10 without any problem. The error I got is: gcc -O9 -Wall -Dthread -lpthread main.o ...
1
vote
1answer
640 views

-lm option doesn't work in GCC 4.8.1

I know I'm not supposed to be posting problems related to programming here. But I couldn't think of any better place and it's quite relevant too. The problem is exactly what the title indicates: when ...
18
votes
5answers
28k views

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.
3
votes
0answers
202 views

Cross compile for ARM using gcc-multilibs

There are various questions available in AskUbuntu related to Cross compiling. They were not of much help to me. I used to work on gcc-4.5/4.6 for ARM. It was available in Ubuntu repo under the name ...
3
votes
2answers
2k views

Why does apt-get want to remove gcc-4.8 and g++-4.8 when I try to upgrade?

I am trying to upgrade gcc-4.8.1 and g++-4.8.1 to 4.8.2. I added the PPA containing g++-4.8.2, ran apt-get update and then when I try: martin@martin-Studio-1537:~$ sudo apt-get upgrade [sudo] ...
0
votes
2answers
1k views

Cannot install gcc-4.8 because of unmet dependencies

I was trying to upgrade gcc-4.8.1 to gcc-4.8.2 using Synaptic from this PPA. The installation executed with no problem, but suddenly I had no gcc-4.8 at all. I was using gcc-4.7 and gcc-4.8 together, ...
0
votes
2answers
811 views

Installing GCC 3.2 : How to resolve error “lvalue required as increment operand”?

I am using Ubuntu 10.04 and the current version of GCC installed in my system is 4.4. For some specific need I want to install GCC 3.2. I began with these steps: $mkdir gcc-build $cd gcc-build $tar ...
1
vote
0answers
298 views

Compiled packages and apt-get mess

Due to my work I have to use the last version of gdb (7.7) which is not provide in the ubuntu repositories. For that purpose I download the source code, compiled it and installed it successfully. My ...
2
votes
0answers
853 views

Problems installing gcc for cross compiling for ARM

I've been trying to install the gcc-arm-linux-fnueabi package, and I've done it a few times by a few different methods but I always seem to be missing the c++ folder in the includes directory. To ...
0
votes
1answer
95 views

How to install two different compilers?

I am an unskilled Ubuntu user and almost each time I try to install something nontrivial I break something miserably. I am successfully using gcc 4.7 and 4.8 simultaneously using update-alternatives ...
2
votes
0answers
178 views

How to repair broken gcc compilers [duplicate]

I want to install g++. But I got error sanket@sanket-Inspiron-N5110:/opt/objdir$ sudo apt-get install g++ Reading package lists... Done Building dependency tree Reading state information... ...
0
votes
0answers
21 views

Can't install rmagic due to the dependencies errors [duplicate]

I can't install rmagic due to the dependencies errors: $ sudo apt-get install libmagickwand-dev Reading package lists... Done //............... The following packages have unmet dependencies: ...
4
votes
1answer
3k views

Where's my /usr/include/sys directory?

I recently upgraded from Kubuntu 12.04 to 13.04, a complete reinstall. Using gcc 4.7.3. I compiled some programs to discover there is no /usr/include/sys directory. That is, types.h, stat.h, etc, ...
0
votes
0answers
24 views

unable to install g++ & gcc compiler in ubuntu 13.10 [duplicate]

I am trying to install g++ & gcc in ubuntu 13.10(3.11.0-15-generic), its showing dependencies issue. how to resolve this
0
votes
0answers
354 views

Installing GCC-4.8.2

I have downloaded GCC 4.8.2.tar.gz,I have also installed mpc,gmp,mpr packages. But still I am unable To install these compilers. While make file it gives me error configure: error: source directory ...
0
votes
0answers
53 views

can not find crt1 crti

I am trying to compile fortran 77 by gcc 4.8, Ubuntu 12.04. I get this and I don't know how to fix it. I have to stay with fortran 77. I am beginner in Ubuntu. /usr/bin/ld: cannot find crt1.o: No ...
-1
votes
1answer
235 views

List containing functions used in C/C++ for Ubuntu's GCC/CC? [closed]

I'm new to programming. What I want is to know as much about programming as I possibly can, and start off with what people say is a good start: programming with C. I have this PDF called "Teach ...
0
votes
1answer
115 views

Problem installing SCTK 2.4.0 on Ubuntu 13.10

I'm trying to install SCTK 2.4.0 on Ubuntu 13.10 with gcc 4.8.1 installed on my system but I get this error after I run "make all" command: In file included from main.cpp:20:0: recording.h:122:29: ...
0
votes
1answer
2k views

apt-get: error loading libgcc_s.so.1

I am using Ubuntu 12.04.3 LTS, 64-bit, with gcc 4.6.3 I want to update gcc to 4.7, and do as the link said: How do I install gcc 4.7? But I got error: Fetched 14.0 MB in 18s (767 kB/s) ...
0
votes
0answers
61 views

Why does Ubuntu make larger compiled kernel file (.deb) than Debian does?

When I compile a kernel in Ubuntu, it is 40% bigger than in Debian (with the same .config). Why? Is it because of little different versions? 40% seems too much to me. Both are up to date, Ubuntu 13.10 ...
-1
votes
2answers
177 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 * ...
0
votes
0answers
147 views

Problem installing old version of gcc with --remove-all

Im on Ubuntu 13.10 and need gcc 4.6 to install cuda 5.5. Im following these instructions (top answer) Anyone has successfully installed CUDA 5.5 on Ubuntu 13.10 64-bit? but am runnning into trouble ...
0
votes
1answer
254 views

Where is my glut?

I try to compile c program : #include<GL/glut.h> #include<GL/glew.h> #include<GL/gl.h> #include<GL/glu.h> void main(int argc, char **argv) { glutInit(&argc, argv); ...
0
votes
1answer
296 views

install gcc and g++

I tried all the commands sudo apt-get build-dep build-essential sudo apt-get install gcc sudo apt-get install g++ But all time I am getting this error. The following packages have unmet ...
0
votes
0answers
152 views

Codelite cannot build

I need your help in configuring codelite and clang or gcc or g++. I have installed clang and build essential. that means i have pretty much installed all I need. but codelite cannot build my ...
0
votes
1answer
717 views

C compiler cannot create excecutables

When I am trying to install a openvpn from a tarball , following error occurs checking whether the C compiler works... no configure: error: in `/home/shubhamd/Downloads/openvpn-2.3.2': ...
0
votes
0answers
197 views

How to: Install Arm cross compilation for GCC4.8 in Ubuntu 12.04

First off, I'm new to Linux and have installed ubuntu 12.04 as a VM to compile code to an ARM dev. kit. Since only the 12.04 version is supported on the dev. kit I'm unable to install e.g. latest ...
1
vote
0answers
400 views

HOSTCC scripts/basic/fixdep gcc: error trying to exec 'cc1': execvp: No such file or directory

hardik@ubuntu:~/ti-sdk-beagleboard-05.07.00.00/board-support/linux-3.3.7$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage HOSTCC scripts/basic/fixdep gcc: error trying to exec 'cc1': ...
1
vote
0answers
173 views

open text file and dispaly in GTK+2 and display

please tell how text file can be read and the data can be then manipulated in GTK+2 C language. i have tried to compile a code but the problem is that only one line is displayed from the text file ...
1
vote
1answer
151 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
2k views

How to build GUI application in C language using GTK+?

I have written code in C language using GTK. This code gives a window with 2 buttons, but I do not know how to make the standalone GUI application from this code. Please explain to me step by step ...
0
votes
0answers
955 views

g++: error: or: Nosuch file or directory

Somedays ago, I updated my system(Ubuntu-32bit 12.04). Since it was a general update and not an upgrade, I didnt suspect anything could go wrong. Now my Codeblocks(12.11) is giving me troubles. ...
0
votes
1answer
47 views

gcc cannot find ansinist.h even though it is there in /usr/incude/ansinist

I am trying to make a program provided by NIST. I do not have much experience in such tasks. I am getting the following error. util.c:19:22: fatal error: ansinist.h: No such file or directory ...
0
votes
1answer
4k views

g++ (4.6.1) does not recognize -std=c++11 [closed]

I'm trying to compiling a program (via Make) using g++ 4.6.1 with flag -std=c++11. It's giving me: cc1plus: error: unrecognized command line option ‘-std=c++11’ This is running on Ubuntu 11.04 ...
0
votes
1answer
391 views

Building nginx on Ubuntu with cache_purge module - help?

I have been trying to rebuild nginx with cache_purge module from http://labs.frickle.com/. I did the following and somehow the new build doesn't seem to include the module. Here is what I did: ...
0
votes
1answer
128 views

Is it possible to downgrade gcc 4.6.3 to 4.6.1?

I'm using Ubuntu 12.04.03 LTS. I installed gcc 4.6.1 from tar.gz , but when I check version with gcc --version the output version is gcc 4.6.3. Is there any way to make the version to become 4.6.1? ...
0
votes
0answers
9 views

How Can I Install Gcc6809? [duplicate]

How Can I Install Gcc6809 ? http://code.google.com/p/gcc6809/downloads/list I am a new user to the system Ubuntu, I need your help in installing This Source . I hope that you will help me . Thank ...
0
votes
3answers
5k views

Installing gcc 4.8 on 13.10 “The following packages have unmet dependencies” [duplicate]

When i go to install gcc 4.8 using: sudo apt-get update sudo apt-get install gcc-4.8 g++-4.8 I get the error message: Some packages could not be installed. This may mean that you have requested an ...
1
vote
1answer
947 views

How do I use the GTK+ development libraries in Ubuntu?

I've been programming for about a year and a half on Windows and I've just started getting used to the way things work on that platform, but now I'm interested in development on Linux and I've been ...
1
vote
0answers
315 views

How to verify a manual build of gcc-4.8.2 on Ubuntu 12.04?

After getting the latest gcc-4.8.2 from one of the gcc mirrors, I issued the following commands as a mere mortal: ./gcc-4.8.2/configure --enable-languages=ada,c,c++,fortran make ulimit -s 32768 make ...
1
vote
0answers
590 views

gcc couldn't locate slab.h in ubuntu 12.04?

Please correct me if I'm missing something here. Thanks for your inputs. Header included in code: #include <linux/slab.h> Code snippet from my file that's asking for memory allocation using ...
0
votes
1answer
44 views

I have seen these in when trying to build a cross compiler what does these mean

../gcc-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers export PREFIX="$HOME/opt/cross" export TARGET=i586-elf export ...
1
vote
0answers
139 views

Installing GCC Cross-Compiler for i586-elf

I was following a tutorial http://wiki.osdev.org/Main_Page to build an OS. I needed to install a cross compiler for i586-elf (Executable and Linkable Format). How to install it on ubuntu 12.04 ?
1
vote
1answer
510 views

Is it possible to let gcc 4.7 and gcc 4.8 co-exist in Ubuntu 13.10

I have some development work, it seems that GCC 4.8 will not work well with other development tools, so I may have to stick with GCC 4.7, but I am not sure if this is allowed in Ubuntu 13.10(64bit). ...
1
vote
1answer
115 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
votes
0answers
816 views

How do I compile with GL/glew.h?

Whenever I try to compile a C++ file using: g++ cgaTOH.cpp I keep getting the following error: fatal error: GL/glew.h: No such file or directory Could someone advise on how to get GL/glew.h ...
0
votes
2answers
791 views

Cross compiling, library gmp not found

I'm trying to cross compile StrongSwan package on Ubuntu for Synology NAS using official Synology toolchain. Host: hostname = ubuntu uname -m = i686 uname -r = 3.8.0-32-generic uname -s = Linux ...
1
vote
0answers
140 views

Binutils won't install

I am trying to build a cross-compiler for i386-elf. I installed bison, flex and texinfo. My system came with gcc, binutils and Gnu make installed. I downloaded the source and ran configure. I then ran ...
1
vote
3answers
151 views

Why am I getting these undefined errors when I compile a C++ program in terminal?

I have a C++ program that compiles and runs perfectly in Code Blocks. However when I try to compile it from the terminal using: gcc -g main.cpp -o Main I get a lot of undefined references: And ...
0
votes
1answer
4k views

Linker error: /usr/bin/ld: cannot find -lgcc_s

I am trying to compile symlinks (tar.gz-file), which is a very small tool with one line for compilation: gcc -Wall -Wstrict-prototypes -O2 -N -s -o symlinks symlinks.c which gives the error ...