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
797 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
3answers
138 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 ...
1
vote
1answer
1k views

CPUMiner won't compile

I am trying to compile a CPUMiner program, but get errors which I don't know what to do about. I am compiling as said here: http://www.return1.at/bitcoin-miner-ubuntu/ The error is: checking build ...
1
vote
1answer
100 views

Different versions of libstdc++6 on 12.04

After upgrading Server 10.04 to 12.04, I was receiving errors related to lgcc_s while trying to compile with g++ and gcc. There are several versions of libgcc_s installed in ...
1
vote
1answer
2k views

problem installing an older version of gcc

problem installing an older version of gcc Hi, I'm new to ubuntu:) I'm trying to compile a program in Matlab using mex (Matlab), but I'm getting an error that I'm using gcc version 4.6.3 and the ...
1
vote
1answer
69 views

Make works fine, but the result does not run. What now?

I am trying to run https://github.com/seanpringle/simpleswitcher on my ubuntu 12.04 I downloaded it and compiled it. However, when I run I get *** glibc detected *** ./simpleswitcher: free(): ...
1
vote
1answer
2k views

Problem with /usr/bin/ld: main.o: undefined reference to symbol 'exp@@GLIBC_2.2.5'

During installation Emerald in ubuntu 13.04 when I write "sudo make" I have problem: libtool: link: gcc -g -O2 -pthread -I/usr/include/libwnck-1.0 -I/usr/include/compiz -I/usr/include/gtk-2.0 ...
1
vote
1answer
1k views

Cannot find -lgfortran

I'm trying to install a package in R (package "ks"). It fails with error message: /usr/bin/ld: cannot find -lgfortran I've already installed the Ubuntu package build-essential: sudo apt-get ...
1
vote
1answer
323 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 ...
1
vote
2answers
165 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
287 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 ...
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 ...
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 ...
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
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 ...
1
vote
2answers
688 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 ...
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
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 ...
1
vote
1answer
10k views

gcc-arm-linux-gnueabi package not found on 10.04 LTS (Lucid)

I am trying to install the gcc-arm-linux-gnueabi package, but this is the error I am getting: $ sudo apt-get install gcc-arm-linux-gnueabi Reading package lists... Done Building dependency tree ...
1
vote
2answers
1k views

Can't link against opengl anymore

After updating to 11.10 I can't link code against libgl/glut. freeglut3-dev etc. are installed and it looks like they can be found too. I'm really not sure what's going on. Makefile gltest: ...
1
vote
1answer
959 views

How to set the default gcc version for only one user

The question Choose gcc and g++ version answers how to do it, but I could not figure out, if it only affects me or also all the other users of the system as I have to use sudo. I share a server ...
1
vote
2answers
2k views

How can I upgrade sqlite3 to at least 3.4.2 (or newer)?

When I try to run sudo apt-cache showpkg sqlite3, I only get the version 3.4.2. I need later than that to compile the sqlite3-ruby gem, and I can't make from source files (even with a ./configure ...
1
vote
3answers
55 views

Problem installing gcc compiler

I tried to install gcc compiler because I want to learn programming I have an old computer 1gb ram so I installed an older version of Ubuntu (10.04) and its working faster than before but when I try ...
1
vote
0answers
102 views

How to install old version of gcc on Ubuntu 14.04

I need to install gcc 3.0 on Ubuntu 14.04. I tried to compile sources but it throws error. Is possible to install gcc 3.0 from repository? How to do that? This does not work for me. apt-get update ...
1
vote
0answers
122 views

Why can I compile against libclang-3.5.so and not against libclang.so?

I am trying to compile a C source file, that needs to be linked against a dynamic library I installed through apt-get (libclang.so). apt-get installed the clang shared libraries in ...
1
vote
0answers
31 views

Change gcc output directory [closed]

How can the output of gcc be directed from default directory to an output directory? I created a source directory containing the source programs and an output directory to store the compiled ...
1
vote
1answer
200 views

C compiler cannot create executables

Everything was right. I have installed gdb from github and installed in /usr/local/bin. After that i removed default gdb(/usr/bin) using the following command sudo apt-get remove gdb Now, when try ...
1
vote
0answers
56 views

unable to compile program using -m32 and gcc

I have installed multi2sim on my 64-bit Ubuntu machine. Both gcc 4.8 and 4.8.1 is installed in my system. Even after setting and exporting the LD_LIBRARY_PATH AND LD_INCLUDE_PATH, and installing the ...
1
vote
0answers
12 views

Modify Ubuntu toolchain

In version 11.10 the flag "--as-needed" became default in the Ubuntu toolchain. Due to many problems I have with undefined symbols at runtime I don't want to change all the makefiles anymore. I want ...
1
vote
1answer
72 views

OpenMP activation on geany

I am new to parallel programing and C, and was wondering how to active openMP on geany or another C program on linux? It is a simple hello world i am trying to make: #include <stdio.h> ...
1
vote
1answer
167 views

GCC related issue(Need to install latest version of GCC 4.9.0)

I am using Ubuntu 14.04 LTS. I want to install latest version of GCC 4.9.0. Is it possible to uninstall default GCC compiler prepacked with OS? In this link, I read that uninstalling the default ...
1
vote
1answer
194 views

Lubuntu - compiling vlc v.1 command make and make install not working

Good day everybody! So, this is my first topic on Ubuntu's forum, and as a perfect Linux beginner and a non-English speaking student, I'll try to do my best to be the most explicit as I can. So ...
1
vote
0answers
91 views

How do I set gcc 4.8 to be the default gcc?

I'm trying to update to gcc 4.8.2. I have Ubuntu 12.04. after this if I type gcc -v it says gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) Next I typed sudo add-apt-repository ...
1
vote
0answers
54 views

How do I set the F77 environment variable to gfortran?

I'm new Ubuntu (and linux) user. In order to do my senior project, I have to install psrchive I use this command to install psrchive ./psrsoft/bin/psrsoft psrchive --no-cfitsio This is part of ...
1
vote
0answers
290 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 ...
1
vote
0answers
387 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
148 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
141 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
0answers
302 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
507 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 ...
1
vote
0answers
120 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
0answers
131 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
0answers
1k views

gcc problem -> stdio.h not found

I have to compile one programme. theoretically i need just to change the two path... can you help me? Makefile # Original #CC=arm-1136jf_s_r1_vfp_hard_float-linux-gnueabi-gcc #CFLAGS= -O3 ...
1
vote
0answers
34 views

How to install gcc-4.8 (x64) on 12.10 [duplicate]

I want to install the newer 4.8 version of gcc, and when I searched for a solution i found this. But when trying to use the solution I ran into a quite annoying problem: sudo add-apt-repository ...
1
vote
0answers
582 views

pthread link failure on Ubuntu 13.10 64 bit with multilib support

I am re-compiling a C application that linked fine on Ubuntu 13.04. It is failing to link (-lpthread -lrt) with: undefined reference to `sem_post' undefined reference to `pthread_create' etc. ...
1
vote
0answers
71 views

Cross compilation of udns for power pc

I have libraries of x86 architecture that I want to cross compile for power pc. I have already cross compiled different libraries for power pc by setting environment variables for powerpc and using ...
1
vote
0answers
838 views

gcc-4.8 Header files

I am having some trouble using the header files provided by gcc-4.8 since updating to Ubuntu 13.10. When I compile with the Intel compiler icc, it complains about not being able to find the header ...
1
vote
1answer
320 views

arm-none-ebai-gcc does not work from mounted directory

I want to build project for ARM micro controller. For this purpose in folder with project was placed script, which download toolchain and build him. After run this script toolchain was placed in ...
1
vote
1answer
89 views

trouble installing gcc 4.8.1

I installed gcc as described below. it installed pretty well, but when I call gcc -v it just shows the former version gcc4.6.3. I do not know where to find the installation so that I can make a link ...
1
vote
0answers
963 views

gcc without g++?

I run Ubuntu 13.04 (x86_64 if it matters) which I recently installed. Before, when using 12.10, I had both gcc and g++ from the beginning. However, with 13.04 after I downloaded gcc-4.8.1 sources I ...