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
245 views

How to install 64-bit libraries on 32-bit system?

I need to cross-compile for 64-bit architecture on a 32-bit platform (using gcc-multilib and -m64 flag). For this I need to install 64-bit versions of the dependent libraries. How do I do that?
1
vote
1answer
512 views

GCC headers on Ubuntu

I was wondering, if there was a go to place to look for c headers, and how to get them on Ubuntu, often times a quick Google search gets me the apt-get package. I was wondering if it possible look up ...
1
vote
2answers
5k views

Is itoa() available in stdlib.h in Gcc >=4.1?

that's my question. I've Gcc 4.4.1 and that function isn’t present, i had installed the 4.3 and 4.5 versions with the same result :-/ I know that this function is not the C-ANSI standard, but I ...
1
vote
1answer
22 views

Build Celestia on Ubuntu 14.04

I'd like to build Celestia-1.6.1 on my Ubuntu 14.04 machine however, it seems that I can't do that easily with the gcc version 4.9.1. I'm using source files from ...
1
vote
1answer
81 views

Update GCC compiler in Ubuntu 14.04 to 4.9 [duplicate]

Can I upgrade my GCC compiler now in Ubuntu 14.04? Has the final usable version (4.9) been released?
1
vote
3answers
106 views

Problem installing gcc compiler [closed]

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
1answer
703 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 ...
1
vote
1answer
1k 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
162 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
107 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
73 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
2answers
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
2answers
180 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
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 ...
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 ...
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 ...
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
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 ...
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
564 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
967 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
0answers
51 views

How to compile Saurik's ldid on Ubuntu?

I am trying to install Theos on my Ubuntu and I am stuck on step which is supposed to install ldid: git clone git://git.saurik.com/ldid.git cd ldid git submodule update --init ./make.sh When I ...
1
vote
1answer
129 views

Using gcc 3.4 on Ubuntu 14.04

By exactly following this post, I was able to install gcc 3.4 on a fresh install of Ubuntu 14.04. But, when I try to compile a program, it fails with the following error: /usr/bin/ld: cannot find ...
1
vote
1answer
51 views

Why can't I link this simple assembly language object file?

I am using Ubuntu 14.04 and Terminal. I am doing an assembly language exercise for a class. I wanted to try running this in terminal, but I am unable to link this file. [I think 'link' is the ...
1
vote
0answers
92 views

OsmocomBB - compile error

I tried to install OsmocomBB on my Ubuntu, I've got gnu-arm-toolchain, but when I'm compiling there is an error: configure: error: in `/home/robert/OsmocomBB/osmocom-bb/src/shared/libosmocore/build- ...
1
vote
0answers
197 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
182 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
51 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
335 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
80 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
136 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
202 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
270 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
114 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
365 views

GDB not showing C code when gcc -g option is used

I have a file called hello_world.c. I use the command gcc -g -Wall hello_world.c Then gdb ./a.out I set a breakpoint at line 27 And run, it tells me this: warning: no loadable sections found in ...
1
vote
0answers
66 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
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 ...
1
vote
0answers
406 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
185 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
163 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
321 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
643 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 ...