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

Replace '0ubuntu1~12.04' packages with '16ubuntu6'

I recently upgraded my server from Ubuntu 12.04 to 14.10. I had installed GCC 4.9 (4.9.2 apparently) before the upgrade and today I wanted to install gcc-4.9-multilib, but apt-get gave me: ...
4
votes
1answer
2k views

GDB crashes with: ImportError: No module named libstdcxx.v6.printers

I have a problem with GDB. Whenever I try to debug any C++ program, just after running it, GDB gives this error: (gdb) run Starting program: /home/errikos/Workspaces/tests/a.out Traceback (most ...
0
votes
5answers
48 views

How to figure out whether a package is already installed?

I installed Ubuntu 14.04.1 as a guest on a windows host. Before installing GCC, I need to make sure that the following packages are installed: GMP, MPFR and MPC I checked the Ubuntu package site ...
2
votes
1answer
206 views

Upgrade to gcc-4.9 broke clang++

Recently I have upgraded to gcc-4.9 but it totally broke my clang++ and I am unable to compile anything. Error I am getting: In file included from src/tester.cpp:11: In file included from ...
-1
votes
1answer
25 views

“Command not found” after running a file compiled on the same directory

I don't know what is going on... d@d-SVF15A17CDB:~/University/CSC209/a1$ gcc -o remvocals remvocals.c d@d-SVF15A17CDB:~/University/CSC209/a1$ dir remvocals remvocals.c ...
0
votes
1answer
12 views

Can't install oracle java and gcc-4.9:i386 on 64bit OS

I have installed oracle jdk7 from the WebUpd8team PPA and it's working just fine, now I want to run a 32bit game (Dwarf fortress with dfhack, for those who know it) and that requires gcc-4.9:i386 ...
0
votes
0answers
11 views

makefile: how to perform “ranlib” operation correctly

I downloaded a third party lib( Library link) which installs and compiles properly. It creates multiple object file (*.o), rather than creating executable, it's using gnu libtool to do some scripting. ...
0
votes
1answer
40 views

How to install library that uses g77

I am trying to install "TAUCS" (http://www.tau.ac.il/~stoledo/taucs/) library. However, I am getting following error: /usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching ...
2
votes
0answers
90 views

unable to install gcc-multilib after upgrading to 14.04

I recently upgraded from 12.04 to 14.04. After upgrading things started to break. I am getting crt1.o: No such file: No such file or directory. So, I tried to install gcc-multilib, but, that is also ...
0
votes
0answers
39 views

Code::Blocks cannot detect the gcc and g++ compilers version 4.8

I installed Code::Blocks 13.12 in my Ubuntu 14.04 and I installed gcc & g++ 4.8 by the terminal. But when I create a C++ console application and try to compile it, it gives me the following ...
1
vote
0answers
138 views

GLIBCXX_3.4.20 not found, how to fix this error?

Whey I try to run the program Layout Editor (available on this site) on Ubuntu 14.04.1 64-bit LTS I get the following output in the terminal: $ layout layout: ...
0
votes
0answers
15 views

I am trying to compile WRF, while checking System Environment Tests am getting error as shown below

I have Created a new, clean directory called Build_WRF, and another one called TESTS (placed Fortran and C Tests Tar File inside TESTS). SUCESSFULLY completed 3 TEST. In the 4th TEST -- Fortran ...
0
votes
1answer
19 views

What is wrong with my executable compiled with GCC? [duplicate]

This is my source file, base.c ... #include "/usr/include/stdio.h" int main( int argc, char *argv[] ) { sprintf("%s\n", "woohoo"); return(0); } I compile and execute with ... ...
0
votes
2answers
3k 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
25 views

Switching from GCC to Clang to compile with OpenCV

I have been compiling code that uses OpenCV by using a CMake project with the following flags in GCC: -Wall -Werror -std=c++14 And it compiled every time. No problems anywhere. When I switch to ...
0
votes
1answer
28 views

Error running make - array type has incomplete element type

I am trying to install libbow library. When i run make file the following error is generated gcc -c -Ibow -I. -I./argp -DHAVE_LIBNSL=1 -DHAVE_STRERROR=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_RANDOM=1 ...
0
votes
1answer
17 views

GnuCOBOL not generating dynamic link library ELF references

Now GnuCOBOL, the Ubuntu package is open-cobol. As of Ubuntu 14.04? the compiler fails to link in dynamic library references for dlopen to use at run-time. No trace of the library in ldd from gcc -l ...
0
votes
0answers
48 views

NVIDIA driver installation failed due to gcc version

I am trying to install the latest NVIDIA driver in Ubuntu 12.04 using the downloaded .run file but the installation failed. Below is the suspected point of failure. -> Performing CC sanity check ...
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 ...
0
votes
0answers
24 views

reinstall libgcc1 to get gcc 4.9

I want to go from gcc 4.8 to 4.9. I had already some 4.9 stuff flying around (gcc-4.9-base, lib32gcc1 and libgcc1(. My (bad) plan was to uninstall them and then get them again with gcc 4.9. ...
1
vote
1answer
77 views

python 2.7.9 backport to trusty (14.04)

I try to backport Python 2.7.9 from vivid to trusty but when launchpad build this pakage there is an build error. I create my backport : backportpackage -d trusty -u ppa:splanquart/python ...
0
votes
0answers
26 views

more than one version of gcc installed

When I enter clang++ -v it outputs Ubuntu clang version 3.5.0-4ubuntu1~xedgers14.04.1 (tags/RELEASE_350/final) (based on LLVM 3.5.0) [...] Found candidate GCC installation: ...
0
votes
1answer
333 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
3answers
302 views

I am not able to compile a simple program using gcc

Wrongly I have install ia32-libs but my host system is 64 bit. Now whenever i try to compile c file i get a message as: unrecognized option '--64' I have uninstall th ia32-libs but I am getting ...
2
votes
1answer
3k views

error in installation of gcc on ubuntu Ubuntu 12.04

I want to install gcc on a ubuntu machine but got the following errors: t@lab45:~# apt-get install build-essential Reading package lists... Done Building dependency tree Reading state ...
1
vote
1answer
186 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 ...
0
votes
1answer
106 views

using system(“clear”); command to clean the screen yet last line printed. using GNU gcc compiler please help

I am using 'system("clear");' command to clean the output screen yet the last line printed is displayed.I am using Geany text editor using GNU gcc compiler.Please help and tell me clear the whole ...
0
votes
1answer
365 views

How to install gcc-4.6 (4.6.3-1ubuntu5) Source Package

I have recently started working on ubuntu and I have been facing a lot of difficulties installing programs in it. I don't know how I managed to install NetBeans and JAVA JDK and JRE. Unfortunately the ...
2
votes
1answer
62 views

compiling g++ programs

I have the gcc installed. I can compile C programs. But I cannot compile C++ programs. If I write g++ on comd line, it says program not installed. I tried sudo apt-get install g++ It gives me a very ...
0
votes
2answers
8k views

How to uninstall gcc 4.6.2

I have gcc 4.6.2 installed (installed from tar source) in my ubuntu server 10.10 64 bit, I have also installed gcc 4.4.5. I want to uninstall gcc 4.6.2 and make my old gcc 4.4.5 default. How can I do ...
0
votes
1answer
53 views

Using mysql in C programming [closed]

I installed ubuntu on a virtual machine.There,I installed mysql server(sudo apt-get install mysql-server) .This worked, because I could acces mysql-u root -p password. After that,I did : sudo apt-get ...
0
votes
1answer
96 views

Ubuntu freezes in recursion g++

Im using Ubuntu 14.04 and gcc version 4.8.2. Sometimes when I run some C++ code which has some bugs, for example Runtime Error, it goes to a deep recursion (I suppose...) and all my computer freezes. ...
-1
votes
1answer
25 views

Install Flex without removing other packeges?

I tried to install ettercap tool but it stops with error "configure: error: flex was not found, please install" so i tried to install flex using $sudo apt-get install flex command but it reports to ...
0
votes
0answers
57 views

g++ and gcc do not work in ubuntu 14.04

After last sudo atp-get upgrade my gcc and g++ don't work and I'm trying to install g++ in my ubuntu 14.04 and I have this error: g++: gcc: What is the problem? sudo apt-get install -f
1
vote
1answer
50 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 ...
0
votes
0answers
51 views

Convert a c file to coff file for nachos

I am new in ubuntu. I am working on nachos and I want to compile a c file in order to convert to .coff format. So I have downloaded mips-x86 linux-gcc and I have extracted both nachos and this ...
0
votes
1answer
120 views

Unable to run g++ after upgrading to Ubuntu 14.10

I did the update from Ubuntu 14.04 to Ubuntu 14.10 yesterday. Today I tried to run g++-4.8 as I normally do, but I have the following error: make: g++-4.8: Command not found I have the same error ...
0
votes
2answers
320 views

C/C++ Compiler for Ubuntu like Dev-C++ [duplicate]

Need a good c/c++ compiler for Ubuntu. I like coding or programming. I used Dev-C++ on Windows. Is there any good compilers like Dev-C++? I tried code::blocks ide but it seems a little buggy for me. ...
22
votes
5answers
44k 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.
0
votes
1answer
33 views

Which compiler i have to use to understand C behaviour exact behaviour

I am confused regarding with the c compilers. as per my knowledge for a programmer the code is not important but the internal behaviour is very important.cause if we know how the compiler behaves for ...
3
votes
2answers
1k views

Bochs Compiling Error AGAIN

I'm trying to compile bochs with this command: ./configure --with-x11 --with-wx --enable-ne2000 --enable-iodebug --enable-disasm --enable-debugger --enable-e1000 --enable-usb --enable-pci it works, ...
0
votes
0answers
190 views

Can't compile C++ in Code::Blocks

I have some trouble with compiling c++ code from **Code::Blocks* IDE on Ubuntu. When I save the code as a .cpp data and click on Run under Build it says: "Target uses an invalid compiler; run ...
0
votes
2answers
404 views

No such file or directory #include <string> [closed]

I wrote the program kai.c and now am trying to compile it with gcc kai.c -o kai, which returns: kai.c:5:18: fatal error: string: No such file or directory #include <string> ^ ...
1
vote
2answers
2k 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
0answers
158 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 ?
0
votes
0answers
207 views

Problem with mex even after installing matlab support

I've looked everywhere for a solution to this but people seem to have no problem with mex and matlab if they install the matlab-support. I however just cannot get this to work. So here is what I did: ...
3
votes
1answer
121 views

Where is `__FLT_MAX__` constant defined on Ubuntu?

I am learning C programming using gcc compiler under Ubuntu 14.04 (64bits). As a practice, I am trying to locate the definitions of size limits of multiple C data types. I have easily located ...
1
vote
1answer
253 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 ...
0
votes
0answers
29 views

how to make gcc search for headers in all subdirectories?

I'm new to Linux so please excuse me for my noobish question. I've installed libraries (PCL) which save their headers under usr/include as it should be. However, the problem is that an example of the ...
4
votes
3answers
6k views

How to fix compilation errors that mention “stray ‘\342’” and “stray ‘\200’”?

I wrote this program: #include<stdio.h> int main() { printf(“Hello World\n”); return 0; } I saved it as first.c and tried to compile but receiving this problem I have installed even gcc ...