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
3answers
3k 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
2answers
97 views

Error installing pynauty: “error: command 'x86_64-linux-gnu-gcc' failed with exit status 1”

I'm trying to install the pynauty Python package. When I ran python setup.py build, I got the following error. I have installed the dependencies. How can I successfully install this Python ...
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 ...
0
votes
0answers
14 views

conio.h header file giving an error during compiling C program in ubuntu [duplicate]

My code for a simple C program is #include<stdio.h> #include<conio.h> void main() { printf("This is demo program \n"); getch(); } when I am trying to run this c program. I am ...
0
votes
0answers
11 views

Conflicts jsoncpp and json

when i try to compile my code then its not compile and gives me following error so any one has solution for that. ketul@ketul-VirtualBox:~/bksrc$ make gcc SearchZipCode.c -o SearchZipCode -I ...
0
votes
0answers
18 views

configure: error: C compiler cannot create executables Ubuntu 14.04

I am getting configure: error: C compiler cannot create executables error while installing harminv program for meep simulations on Ubuntu 14.4 . Kindly guide me how can i remove the error. config log ...
1
vote
0answers
27 views

Raspberry Pi C++11 std::thread: pure virtual method called

Ubuntu 14.04. I've installed gcc-arm-linux-gnueabihf, g++-arm-linux-gnueabihf (tried 4.8 and 4.9 from utopic). Code that uses std::thread: #include <iostream> #include <chrono> #include ...
4
votes
1answer
136 views

How to compile programs that use term.h?

I try to compile the code below: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <term.h> //#include "/usr/include/term.h" void clear_screen(void) { ...
1
vote
0answers
19 views

Help with cross-compiling for ARM

I have recently been trying to cross-compile programs for ARM. However, when I run make, I always get an error within a minute or less that says something like ...
0
votes
0answers
17 views

Compiling on ubuntu from raspberry pi

Could somebody help me out on getting the compiler that a raspberry pi uses on ubuntu? I am using NOOBS on the raspberry pi, but when I transferred a program over on ubuntu, I get a seg fault (core ...
0
votes
0answers
30 views

How to disable -Werror=format-security in mpicc?

folks! I want to install parallel version of AMBER (a molecular dynamics program) on my Ubuntu 14.04 LTS. However, the "-Werror=format-security" option of CFLAGS always interupts the installation. My ...
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 ...
4
votes
1answer
8k views

How to install clang++?

I'm having trouble getting clang++ to work as I compile my code. Specifically, I'm getting a make: clang++: Command not found error. I've run sudo apt-get install llvm, and also sudo apt-get install ...
1
vote
1answer
27 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 ...
32
votes
6answers
67k 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.
1
vote
0answers
25 views

Use package without declaring its version

I have installed g++ from here. When I want to compile a program, I have to use g++-4.9 myle.cpp. How can I set it to use without declaring its version g++ myle.cpp?
1
vote
2answers
38 views

GCC Fatal Error

everyone Here's my problem; So, I'm new to Ubuntu and programming and I just wanted to start with C. I created the classic "hello.c" file #include <stdio.h> main () { printf("Hello ...
5
votes
1answer
1k views

warning messages while compiling c program using gcc [closed]

I am new to linux. I use gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 on Ubuntu 12.04 LTS. When I compiled the c program using pointer, I got the -Wformat warning as shown below. But if I execute a.out ...
0
votes
0answers
13 views

mex: Command not found

I am trying to use mex to call C-function from Matlab. However, I get the following error: make: mex: Command not found Could someone please let me know how to fix it?
0
votes
0answers
33 views

gcc command and g++ command does not work

What should I do if my gcc command and g++ command does not work? I have installed opencv from github.com but when I write the code in nano compiler and try to run the same using g++ command,I get ...
0
votes
1answer
143 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
2answers
575 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
1answer
63 views

gcc: Skipping incompatible libraries and returning error

This question is related to my previous question. I am trying to install the "TAUCS" library TAUCS is a C library of sparse linear solvers. It has dependency on BLAS, ATLAS, LAPACK, METIS etc. I ...
0
votes
1answer
68 views

Kernel module compilation fails (gcc: error: elf_x86_64: No such file or directory)

I'm trying to compile a simple kernel module, but the compilation fails due to a wrong argument passed by make to gcc. This is the Makefile: obj-m += test.o all: make -C /lib/modules/$(shell ...
0
votes
1answer
22 views

Lubuntu: Apt-Get Can't Find GCC

I'm trying to install gcc so I can compile the no-ip client. When I try to use apt-get, the command returns: unable to locate build-essentials What is the correct apt-get install package command to ...
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 ...
5
votes
7answers
9k views

Can I use a C/C++ compiler?

I shifted to Ubuntu 10.10 now I am facing problem to have C/C++ compiler. What are the possible ways so that I can use C/C++ compiler using all the libraries (like graphic, math, conio, stdlib, etc) ...
10
votes
3answers
20k 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
1answer
25 views

Is GCC 4.5 still required to build biarch (Shared WoW64) Wine on Ubuntu?

I would like to build a biarch Wine on my 64 bits laptop. But reading all the pages of the WineHQ project on such a configuration, I found a page about gcc version (written in May 2013), explaining ...
0
votes
1answer
20 views

LibCurl: how do I compile the example code?

I have install libcurl by running: sudo apt-get install libcurl4-gnutls-dev Now, the folder locates at my /usr/share/doc/libcurl4-gnutls-dev/examples$. Say I want to compile ftpget.c. How do I do ...
1
vote
1answer
38 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 ...
0
votes
1answer
4k views

when building u-boot /bin/bash: arm-none-linux-gnueabi-gcc: command not found

I am currently running Ubuntu 12.0.4 on a 64 bit machine. I have an AM335X development board. Along with the kit came the compressed kernel (linux 3,2), rootfs, u-boot, and ARM cross compiler ...
0
votes
0answers
38 views

How to run new added binaries using makefile

I have added some pre-compiled tools for developing ARM into the /home/charlie/bin/ARM directory. When I modify the path by PATH=/home/charlie/bin/ARM:"$PATH" I can execute arm-none-eabi-gcc in the ...
0
votes
0answers
50 views

cross-compiling with clang using mingw

I was trying to compile under linux for windows. I have installed binutils multilib for linux and w64-mingw. If I compile with x86_64-w64-mingw-gcc everything work, but if I use clang with -target ...
1
vote
2answers
15k views

How can I check that GCC is installed correctly?

I have installed GCC with apt-get. How can I check that it is installed correctly and which version?
0
votes
0answers
17 views

ubuntu 10.04 vm corrupted, tries to run 32-bit which ltib can't access path

All, I am running a 64bit version of Ubuntu 10.04lts doing software/kernel work for the imx6 processor. Yesterday, something I did caused ltib not to find the cross-compiler on the path, even though ...
1
vote
1answer
436 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 ...
0
votes
2answers
156 views

Problem installing SCTK 2.4.0 on Ubuntu 13.10

I'm trying to install SCTK 2.4.0 on Ubuntu 13.10 with gcc 4.8.1 installed on my system but I get this error after I run "make all" command: In file included from main.cpp:20:0: recording.h:122:29: ...
0
votes
0answers
77 views

Just installed mysql c++ connector, 'undefine reference to 'get_driver_instance'

This is frustrating I've followed everything from the official mysql connector c++ website. I downloaded the binaries for 64 bit, opened it with archiver. It extracted into a folder 'usr' and had an ...
3
votes
1answer
52 views

OpenMP unable to use multiple threads, no error associated with compilation

I am using openMP for my lab assignments and everything worked fine few weeks ago, but now it runs only on one thread, I've read and I guess that this is due to conflict between packages. This is the ...
0
votes
1answer
132 views

cannot execute filename.o file in cygwin with gcc

I have a build shell script that reads as follows, #!/bin/sh gcc -o posture.exe main.c posture_algorithm.c Then I run the following command to set permission, chmod 755 posture_algo.o followed ...
0
votes
0answers
38 views

How to add libxml2 to a Makefile?

While compiling a C++ tool called BioC I encountered a problem with the libxml header. In my attempt to solve it I downloaded libxml2-2.9.2 and compiled it in '/usr/local/lib/'. Then I studied the ...
0
votes
2answers
62 views

How to install GCC without internet connection and what do I have to keep in mind when installing GCC?

I have 2 operating systems on my pc: windows 8.1 and Ubuntu. Windows 8.1 has internet connection, but Ubuntu does not. Is there a way I can download GCC for Ubuntu on my drive and then transfer and ...
2
votes
1answer
632 views

cannot compile gcc or g++ libc_nonshared.a not recognized

I cannot compile C/C++ files anymore since using a new account (I think it was since then anyway) and I'm getting a strange error every time I try to compile: ~$ g++ hello.cpp ...
0
votes
1answer
349 views

Error installing pygame: “error: command 'x86_64-linux-gnu-gcc' failed with exit status 1” [closed]

So I've tried pretty much all the answers to similar questions I've been able to find, but I still haven't found a working solution. The complete info I get is: ...
1
vote
1answer
155 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
votes
1answer
309 views

/bin/bash: g++: command not found error 127

I was trying to install a software quicknet from a tar.gz file. After using ./configure when i tried using make it showed the following erroe g++ -I. -I. -c QN_args.cc /bin/bash: g++: command not ...
2
votes
1answer
3k 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
126 views

Ubuntu Touch in Nexus And GCC

I install UBuntu touch into my nexus: Why I can NOT run a simple hello world application compiled with gcc directly using the terminal console. I get permission denied. But I am able to run thourght ...
5
votes
1answer
5k views

Where's my /usr/include/sys directory?

I recently upgraded from Kubuntu 12.04 to 13.04, a complete reinstall. Using gcc 4.7.3. I compiled some programs to discover there is no /usr/include/sys directory. That is, types.h, stat.h, etc, ...