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
3answers
465 views

What version of GCC is used by the make command? [closed]

Is there any way to know what version of gcc is used by the make command? I have 5 versions installed of gcc on my computer: by dpkg -l | grep gcc ii gcc ...
1
vote
1answer
49 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 ...
0
votes
2answers
29 views

how to know which version of the compiler used to install a program from source among all versions of the that compiler

I installed a program via source code . To do that I downloaded a gcc and g++ appropriate for that. I use this command in order to install that $ export CC=gcc-?? CXX=g++-?? && ./install ...
1
vote
0answers
16 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
10 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 ...
0
votes
1answer
38 views

How to install libmudflap in 64-bit 14.04 “Trusty”

I wish to demonstrate mudflap working on this program, int main() { int tab[10]; int i; for (i = 1; i <= 10; i++) tab[i] = 0; return 0; } but I get an error, $ gcc -fmudflap ...
0
votes
1answer
57 views

How to install an 'ansi c' compiler ? ? ? ( how can I extend GCC G++ with ANSI C )?

To explain the problem (try two): I can't install the lua compiler (lua dot org) with the newest version of Ubuntu, quote out of the manual to install lua: Installing Lua Lua is distributed in ...
-1
votes
1answer
96 views

cannot install lxml in virtualenv (python)

I cannot install lxml. In system i have python-lxml package, but i need other... Please help, if you can - my task is install lxml for development in virtual enviroment using virtualenv. I found this ...
1
vote
1answer
15 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
0answers
47 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
82 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 ...
0
votes
2answers
17 views

ELF shared libraries

I have a question about using libraries on Linux. Lets say I have a program called MYPROG and two libraries LIBABC.SO and LIBXYZ.SO. MYPROG loads the module LIBABC.SO with "dlopen RTLD_NOW". "dlopen" ...
0
votes
0answers
28 views

Installing GCC 4.9 on 12.04 (precise) [duplicate]

I can't find any ppa's that provide gcc 4.9 for Ubuntu 12.04. Any suggestions on how to obtain it? Note: this is probably not a duplicate question. Related questions are: gcc 4.8 for 12.04: ...
-1
votes
1answer
33 views

GCC 4.8.1 to GCC 4.6.3

i am using ubuntu 12.04. Initially ubuntu 12.04 have gcc 4.6.3 with it. I upgraded it to 4.8.1. But now one of my application that was working fine with 4.6.3 are not working with 4.8.1. I want to ...
0
votes
1answer
34 views

makeMKV setup error

When I run sudo bash configure (./configure doesn't work), I get this: checking whether we are cross compiling... configure: error: in /media/pitaj/Shared/Documents/makeMKV/makemkv-oss': ...
0
votes
2answers
29 views

Downgrade to GCC < v3.0

For specific reasons I have to downgrade my GCC to version 2.x using apt-get (not downloading and compiling the source) Is that possible? If yes, how can I find the repository address and install it ...
0
votes
1answer
164 views

How to install gcc-4.7-arm-linux-gnueabihf on Ubuntu 12.04?

I want to install gcc-4.7-arm-linux-gnueabihf or greater on Ubuntu 12.04, any suggestion? The default one is gcc-4.6-arm-linux-gnueabihf.
0
votes
0answers
15 views

how to downgrade gcc from 4.5.2 to 2? [duplicate]

I'm using ubuntu that have gcc version 4.5.2 on it. I really need to downgrade it to any 2 versions but i don't know how and where can i find that version.
0
votes
1answer
79 views

How to enable c99 and c11 on gcc?

When I compile the following code it gives compilation error that error: ‘for’ loop initial declarations are only allowed in C99 mode for(int i = 0; i < 5; i++) and to compile your code use ...
2
votes
3answers
862 views

How do I use the latest gcc 4.9 on Ubuntu 14.04

I want to compile my program with the latest version of gcc. Ubuntu 14.04 comes with gcc 4.8.2, however there's 4.9.0 available, moreover, I see that it is available as a package: gcc-4.9. I tried to ...
0
votes
0answers
168 views

g++ 4.8.2 on ubuntu 14.04 fails to compile source files

I'm really frustrated at present in that g++ is throwing up so many errors even on a simple .cpp file. I'm typing: g++ test.cpp at the command line. Thanks in advance for any help. I downloaded g++ ...
0
votes
0answers
59 views

Unable to install gcc on ubuntu 12.04 LTS

I am trying to install gcc on ubuntu using : sudo apt-get install gcc I get the following error: Reading package lists... Done Building dependency tree Reading state information... Done You ...
0
votes
0answers
67 views

/usr/bin/ld: error: cannot find -lpython2.7

While installing pyscard.py I get this error, gcc -pthread -shared -Wl,-rpath,$ORIGIN/../lib -g -L/home/builder/jenkins/workspace/Python_Masters/ARCH/x86_64/label/Linux/core/lib ...
1
vote
0answers
78 views

bfd.h should include libiberty/ansidecl.h in Ubuntu 14.04?

binutils package seems to be changed, as include directory of libiberty.h has moved to /usr/include/libiberty, thus there is possible a wrong include in bfd.h regarding ansidecl.h. Getting those ...
2
votes
1answer
78 views

Compile error when trying to run make

I have the following error when trying to run make command, /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../libcppunit.a when searching for -lcppunit /usr/bin/ld: ...
3
votes
1answer
193 views

gcc won't link with -m32

Trying to compile even the simplest (int main(){}) program with -m32 on a 64-bit system fails: $ gcc -m32 test.c /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when ...
2
votes
1answer
6k views

How to install gcc 4.9 on Ubuntu 14.04? [duplicate]

Now that gcc 4.9 is officially released, is there an easy and convenient way to install it on Ubuntu 14.04 through the package manager (ie. apt-get)? I would also appreciate information on how to ...
0
votes
1answer
50 views

Install something without make install [closed]

I have been struggling for few days trying to install a software. I'm not actually working on Ubuntu but I think the steps to do are the same. Working on a gentoo (The operating system of the Robot ...
0
votes
0answers
78 views

I already have the newest version of g++ but I still get a 127 error what do I do?

I have done the following. I just don't know what to try next. I supposedly have the newest version of gcc by following these directions sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo ...
0
votes
2answers
145 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 ...
0
votes
0answers
47 views

I need some help with ld not found library lgcc

I need some help with language C. Well I am trying to compile from my iPad, with the mobile terminal. So I have installed gcc , the headers and the ldid writing apt-get install ldid. It looks like it ...
1
vote
0answers
67 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 ...
0
votes
0answers
24 views

Trying to compile 'mips64' program with gcc 3.3 but it has an error when building binutils and gcc

I tried building binutils and gcc3.3 for mips64 and everything goes well until: make CC=$GCC make install [For make an error saying, that: gmp.h and confdefs.h are not found] [For make install: ...
2
votes
1answer
30 views

how to create a ppa .dep that depends on non-default GCC?

I want to create a .dep package in my PPA. That project however requires a recent GCC 4.8 or Clang 3.4+. I found out, that you can add custom PPA dependencies, so I added ubuntu-toolchain-r/test to ...
-1
votes
1answer
40 views

LD_LIBRARY_PATH

I have tried to link VINCIA to ROOT, but there is a problem related to the location of the shared libraries in my system. Since I have installed all these tools in a directory which is different than ...
0
votes
0answers
103 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 ...
0
votes
1answer
35 views

problem with gcov, cannot run

So i'm trying to optimize a file called linpack.c. I have to use gcov to find the 10 most executed lines. I've been given these compiler options: -fprofile-arcs -ftest-coverage -O2 So i ran this $ ...
0
votes
1answer
63 views

I have updated GCC, but g++ still seems to be using the stl files from the old GCC

I run ubuntu 12.04. Recently, I have followed this post and updated GCC to 4.8.1. Now, when I compile with g++, I get compiler output like these: /usr/include/c++/4.6/bits/stl_algobase.h:743: note: ...
0
votes
0answers
82 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. ...
2
votes
1answer
74 views

what is the difference between which gcc and dpkg -l | grep gcc

based on Ubuntu 12.04 man page for which which returns the pathnames of the files (or links) which would be exe- cuted in the current environment, had its arguments been given as com- ...
1
vote
0answers
36 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 ...
3
votes
0answers
59 views

Compiling and linking of a C program

I am learning about compiler linker and loader and was trying to understand the working of linker and loader on my ubuntu 12.04 machine I wrote 2 simple ".c" files as follows test.c ...
0
votes
0answers
298 views

“Error : No targets specified and no makefile found” when configuring eclipse for stm32 development

I'm trying to configure eclipse for stm32 development, and I followed some video tutorial on Youtube and it was OK till the last few steps when an error occured I'm working on Ubuntu 12.10 and ...
3
votes
1answer
57 views

Where to get the latest GCC (GNU C Compiler)

Currently my version is 4.8.4 but Ive found that some sites offer a 4.9 version. like this http://gcc.igor.onlinedirect.bg/snapshots But where do they get the source from? I want to know so I can be ...
0
votes
1answer
26 views

Was installing gcc 4.8, ran out of diskspace now cant use gui, how to fix?

I have tried removing programs, including the unfinished gcc 4.8 install, but i get the error unmet dependancies. All the files I have left are really important so i cant delete them. Is there any ...
0
votes
1answer
162 views

Header files missing

I'm trying to compile a source code and I'm getting many errors indicating that header files are missing from my system checking sys/ioccom.h usability... no checking sys/ioccom.h presence... no ...
4
votes
1answer
1k 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
204 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 ...
8
votes
3answers
8k 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
107 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 ...