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

How to disable -Werror=date-time/macro “__DATE__” might prevent reproducible builds

I am trying to compile a driver for a Netis WF2190 adapter. Yes, I just downloaded the latest from them. How can I disable the -Werror=date-time in the build? I can't find it anywhere in the build ...
1
vote
1answer
242 views

gcc doesn´t work

I have a problem with GCC I try to compile Wine 1.7.26. When I use the ./configure command I get an error: C compiler cannot create executables See `config.log' for more details This file contains ...
1
vote
1answer
1k 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': ...
1
vote
1answer
159 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
vote
1answer
4k views

gcc segmentation fault on Ubuntu 12.04

I am trying to compile a C program on Ubuntu precise 12.04. Here's the program: #include <stdio.h> int main(int argc, char** argv) { printf("Hello World!"); return 0; } My gcc version is ...
1
vote
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 ...
1
vote
1answer
6k 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: ...
1
vote
2answers
8k 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
16k views

Is it possible to downgrade gcc 4.6.1 to 4.4.x?

I've tried the following: sudo apt-get remove gcc sudo apt-get install gcc-4.4 But this does not work, running gcc --version gives a 'No such file or directory' error.
1
vote
2answers
5k views

Compile 32 bit on 64 bitsystem

I'm trying to compile a 32 bit version of python on a 64 bit ubuntu system with the following configure command: CC="gcc -m32" LDFLAGS="-L/lib32 -L/usr/lib32 \ -Lpwd/lib32 -Wl,-rpath,/lib32 \ ...
1
vote
1answer
1k views

How to downgrade gcc from 4.4.4 to 4.2.1?

The newest Ubuntu (10.10) has gcc version 4.4.4, but I need 4.2.1 for compilation issues. The library that I'm using requires me to use 4.2.1. How can I downgrade the gcc to a specific version?
1
vote
1answer
879 views

How do I run g++-4.5?

I've installed g++-4.5 via apt, and there exists a /usr/bin/g++-4.5. However, when I try and run g++-4.5, I get this error message: /usr/bin/g++-4.5: not found (hardened-c++ could not find target) ...
1
vote
1answer
39 views

Abnormal behaviour of malloc() fuction?

I was playing around with alloc functions in my Ubuntu 14.04 64-bit, gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) and found that malloc returns memory with initializing it to zero. Which is quite weird ...
1
vote
1answer
363 views

Problem installing g++ ccompiler on Ubuntu 14.04

I tried to install g++ using packages from another user. offline..but there were errors. After connecting to the net I tried to install using sudo apt-get install g++, but it gave the following ...
1
vote
3answers
4k views

How do you fix a gcc compile 127 error? sudo apt-get install g++ doesn't work

*emphasized text*when I try to run a program I get the following error. ubuntu@ubuntu-VirtualBox:~/Desktop$ make g++ -Wall -Wno-switch -I. -g -c -o pass.o pass.cpp make: g++: Command not found ...
1
vote
1answer
3k 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 ...
1
vote
1answer
606 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
586 views

Generating a hex file(new to ubuntu)

How am I supposed to compile/generate a .hex file (object code) of a c program using a gcc compiler?. Will the procedure be the same for a different gcc compiler compatible with a different processor? ...
1
vote
1answer
3k views

diff between x86_64-linux-gnu-gcc and plain old gcc?

I'm trying to compile something called a "Voice Cloning Toolkit" for Festival and HTS. (see: http://homepages.inf.ed.ac.uk/jyamagis/software/page37/page37.html) I've found that lots of things break ...
1
vote
1answer
3k views

How can i downgrade GCC 4.7.2?

i want to downgrade GCC and G++ 4.7.2 to some older versions, 4.0 perhaps. Any assistance? I'm using Lubuntu ATM.
1
vote
1answer
1k views

Make gcc coloring the default

Is there a way to automatically make gcc color its output? I am looking to avoid an alias as the the command is commonly used in makefiles (where it will not be used). Is there an easy way to do ...
1
vote
1answer
98 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?
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 ...
1
vote
1answer
228 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
466 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 ...
1
vote
1answer
3k views

How to link with libcurl on Pangolin

Since Pangolin, I can't manage to link any program with libcurl, even the example provided with libcurl themselves. I have installed libcurl: sudo apt-get install libcurl4-gnutls-dev Then as the ...
1
vote
1answer
259 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
3answers
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
1answer
547 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
48 views

How to install MIRACL c++ library in Ubuntu 14.04?

I'm trying to install the library from the link https://certivox.org/display/EXT/2.+Installation . But when I try the command: gcc –I. –c –O2 mr*.c I get error saying : gcc: error: /I.: No such ...
1
vote
1answer
114 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
366 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
1answer
4k views

-std=c++11 not recognized on gcc 4.8.1

I just followed an answer to this question to update my gcc version to 4.8. 1 on Ubuntu 12.04, which I thought would support C++11. However it does not seem to. When I try to compile something with ...
1
vote
3answers
159 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
179 views

Use gcc-4.6-arm-linux-gnueabihf to compile .c file, What is the command?

I am doing cross compiling. I install the gcc-4.6-arm-linux-gnueabihf and want to use it to compile the .c file(example of hello world) and then run it on ARM. I don't know what is the exact command. ...
1
vote
1answer
2k 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
214 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
130 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
76 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
3k 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
201 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
423 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
6k 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
429 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
5k 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
878 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 ...