Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [g++]

G++ is the C++ front-end of the Gnu Compiler Collection (GCC)

0
votes
1answer
34 views

How to execute g++ code and run it as well using execl

I am writing a program in c++ that uses fork and then child program do execl which opens xterm and execute another program let's say p2code. Here is what I am doing execl("/usr/bin/xterm", "/usr/bin/...
0
votes
1answer
52 views

dpkg was removed how to reinstall

apt was having problems with dpkg. I was trying to do sudo apt install g++ but I kept on getting errors. It was very weird it kept on saying that g++ was already installed and fully upgraded. I ...
0
votes
0answers
24 views

Install g++-9 for c++20

I would like to run the full features of c++20 on g++. However, I need to install g++-9 for this purpose. Following the installation guides for old versions of g++ do not work for g++-9. Any hint? ...
-2
votes
0answers
23 views

Unmet dependencies when installing g++ and Codelite [duplicate]

How to install or update g++ Codelite. There seems to be an error on my terminal? Can someone help me to how to install it?
0
votes
1answer
54 views

Compiling a C++ program with Chilkat library

This is the error I get when compiling my program with the Chilkat library. I understand that I need to include the "-l" but when I include that, it gives me this: /usr/bin/ld: cannot find -lchilkat-...
0
votes
0answers
99 views

Ruby Installation on Ubuntu 18.04.1 LTS usig RVM Failed

Steps followed from Digital Ocean Website. Following Command is used cat /tmp/rvm.sh | sudo bash -s stable --rails Following Error Occurred Downloading https://github.com/rvm/rvm/archive/1.29.4....
0
votes
0answers
48 views

Trouble compiling g++ with following command on openCV

I have used realsense sensor from source code from github: IntelRealSense/librealsense When I compile this commend following the source: g++ -std=c++11 IR_sample.cpp -lrealsense -lopencv_core -...
1
vote
0answers
58 views

Compiler error after upgrade to Ubuntu Bionic 18.04 and g++ 7.3.0

As said in the title, I just upgraded to Ubuntu Bionic, 18.04, which comes with g++ 7.3.0. Since then I get these compiler error messages: In file included from /usr/include/c++/7/ext/...
11
votes
2answers
1k views

Disabling C++11 in GCC 7.3

It seems like in Ubuntu 18.04, the default shipped g++ (version 7.3.0) runs in C++11 compatible mode by default. I am getting some errors in my old codes which are not C++11 compatible. I installed g++...
0
votes
0answers
154 views

Failed to update system or install any program on Ubuntu 18.04 - too many levels of symbolic links usr/bin/g++

I have some problem which I don't know how to solve. I am using Ubuntu 18.04 and when I try it to update it by typing: sudo apt-get update sudo apt-get upgrade In a second line I got: Reading ...
1
vote
1answer
155 views

Issue with gcc/g++ while cmake building (./bootstrap)

I decided to reinstall cmake but after removing it I am having an Issues with installing. After entering a ./bootstrap It prints I am using type of g++ which I dont know how I got it CMake 3.12.0, ...
0
votes
0answers
32 views

How could I switch OpenMPI library based on the gcc/g++ version?

Using the methods describe here I could easily switch gcc version with update-alternatives. Now, I have two versions of openmpi-3.1.1 that is compiled for each of them, namely: /home/user/me/.local/...
-1
votes
1answer
318 views

'Bash ./main: No such file or directory' error while trying to execute a C++ program

The code snippet: #include <iostream> using namespace std; int main(){ unsigned int a, b, diff; cin>>a>>b; diff = a - b; if(diff % 10 == 9){ diff--; }...
0
votes
0answers
40 views

Possible to install g++ 5 on 14.04 offline?

for reasons too long to delve into I'm wondering if it is not possible to install g++5 (or c++14 compliant) C++ compilers on a machine running 14.04 with NO network access. I'm working on building a ...
0
votes
0answers
82 views

“SigPack - the C++ signal processing library” installation and run help

I am still new to Linux and I'm trying to install "SigPack-a signal processing library". Instructions on SourceForge(http://sigpack.sourceforge.net/build.html) are pretty vague but I managed to ...
2
votes
0answers
470 views

Upgrade to python 2.7.15 (for gdb 8) on Ubuntu 16.04

I am running Ubuntu 16.04 with gdb version 7.11.1-0ubuntu1~16.5. When I upgraded g++ to g++-6.4 (Ubuntu 6.4.0-17ubuntu1~16.04), gdb started giving python errors like: Python Exception <class '...
0
votes
0answers
92 views

g++ libraries under Windows Subsystem for Linux (WSL)

How can I know where and what exactly are the g++ libraries in my WSL (Ubuntu 16.04)? Would the libraries be influenced by those under Windows?
0
votes
0answers
212 views

Using mpicc with update-alternatives

Since I am using CUDA 9.1 on Ubuntu 18.04, I need to use gcc-6 as suggested here. To deal with 2 versions of gcc (Ubuntu 18.04 comes with gcc-7), I have adopted the update-alternatives method as ...
0
votes
0answers
36 views

Can't configure custom GCC version after installation

I build GCC 6.3.0 according to the answer here After sudo make install I am trying to configure it. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /...
1
vote
1answer
49 views

Can not open cpp excutable after compilation [duplicate]

I am having problem executing a cpp file after compilation. Here is the text output and how I compile it and try to run. coovi@coovi-Surface-Book:~/HW9$ g++ -Wall main.cpp -g -o main coovi@coovi-...
0
votes
1answer
105 views

Unable to install g++ compiler in Ubuntu 16.04

First I updated like this sudo apt-get update last it shows like below: Fetched 323 kB in 1s (247 kB/s) Reading package lists... Done Then I install g++ compiler....
-1
votes
3answers
497 views

Why do I get syntax error when I try to run my C++ program after compiling it?

I am trying to learn C++, but I can't even make the first (hello world) example from cplusplus.org work with g++ command or c++. I created a file just like the example and ran g++ myfile, then ./...
1
vote
0answers
156 views

cannot cross-compile a c++11 program with multithreads using cmake

When I first tried to run the program, I got the following output: This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, ...
0
votes
0answers
54 views

How can I get core dump info which is happened while compiling

I encountered a core dump when compiling a linux project. the outpu/log is belows: collect2: error: ld terminated with signal 6 [Aborted], core dumped * Error in `/opt/toolchain/arm-2014.11//arm-linux-...
1
vote
1answer
96 views

Code::blocks 16.01 not compiling

I have Ubuntu 17.10 and Code::Blocks 16.01. I cannot build and run simple code like "Hello World!". -------------- Build: Debug in program (compiler: GNU GCC Compiler)--------------- g++.exe -Wall -...
0
votes
0answers
187 views

Ubuntu 17.10 gcc version 6.3 (not 6.4) for MATLAB support

The required version of GCC for Matlab is 6.3. Ubuntu 17.10 ships with gcc 7.2. The package gcc-6 is available, but that is version 6.4, which doesn't work with MATLAB. Does anyone know a way to ...
-1
votes
1answer
56 views

Simple C++ Thread Program Can't Be Compiled

The following is my 1st multi-threaded program. But while it was compiled, there is a linking error. The part of the error message: std::thread::thread<void (&)(int), int&>(void (&...
1
vote
1answer
379 views

How to install g++ in Ubuntu 17.10?

I've tried sudo apt-get install g++ but I've faced the following error: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be ...
0
votes
0answers
120 views

Error upgrading g++ No such file or directory: '/usr/lib/python3/dist-packages/scipy/lib/decorator.py'

I was trying to update g++ to compile in c++. Then, doing: sudo apt install --only-upgrade g++ I get the following error: sh: 0: getcwd() failed: No such file or directory Setting up python3-...
1
vote
1answer
419 views

How to integrate the default g++ compiler with vscode?

I installed Ubuntu 16.04LTS about a week ago. Also, I installed 'Visual Studio Code (VScode)' to do some c++ programming but I couldn't find any article on the Internet that explicitly explains how ...
0
votes
1answer
110 views

lib not found (ncurses)

I'm trying to compile this c++ project: https://github.com/YvesZHI/FallingCode I've successfully compiled it on my Mac OS, however, when I try to compile it on my ubuntu16.04, I get errors as below: ...
0
votes
0answers
26 views

Installing G++ 3.4.2 to a specific prefix/suffix [duplicate]

I'm submitting code to an Online Judge which uses G++ 3.4.2, but my computer has G++ 7.2.0 installed from apt. I'd like to install the older version of G++ and GCC to g++-3.4.2 and gcc-3.4.2 instead ...
2
votes
0answers
2k views

How to install gcc-4.9 on ubuntu 17.10(artful)

can someone help me to install gcc/g++ 4.9 on artful? there is no package for artful in repository just for 16.04(Xenial) and 17.04(Zesty)
0
votes
0answers
42 views

How to compile avx assembly in Ubuntu virtual machine?

I'm trying to compile some avx instructions { double* dst = NULL; const int* ait = a; int N=0; const int* aend = a+N; __asm__ __volatile__ ( "0:\n" "vmovupd (%...
1
vote
1answer
965 views

g++ gcc include files not found

I have posted on another site, so hopefully this isn't cross posting: I have a few versions of gcc and g++ on my Ubuntu 16.04 which i select with alternative config. When compiling a very simple ...
0
votes
1answer
291 views

Error: build-essential : Depends: g++ (>= 4:4.4.3) but it is not going to be installed

I'm trying to install build-essential using sudo apt-get install build-essential command. I get this error: The following packages have unmet dependencies: build-essential : Depends: g++ (>= 4:4.4....
0
votes
1answer
207 views

g++ uses OpenGL 3.0 but I have 4.5

In the c++ code I put the line fprintf(stdout, "%s\n", glGetString(GL_VERSION)); and it outputs 3.0 Mesa 17.3.0-devel although $ glxinfo | grep "version" server glx version string: 1.4 client glx ...
0
votes
0answers
81 views

g++ Conflicts appeared

When I type: g++ --version in a console, I get the message: The program 'g++' is currently not installed. You can install it by typing: sudo apt install g++ But, when I type: sudo apt install g++...
0
votes
0answers
264 views

sudo apt-get install make g++ libssl-dev binutils error

Does anyone have code to replace this, I have tried all suggestions so far. The following packages have unmet dependencies: g++-4.8 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14....
1
vote
1answer
1k views

g++ cant find cstdlib (fatal error: cstdlib: No such file or directory) [closed]

Im trying to compile the very simple c++ Program //Programm, um Celcius in Fahrenheit umzurechnen // F=C*(212-32)/100+32 #include <cstdio> #include <csdtlib> #include <iostream> ...
2
votes
1answer
865 views

Update gfortran library

I am confused by the versions I have on my machine. I am running Ubuntu 16.04. The output of gcc --version and g++ --version tells me that I have 7.2.0 installed. Great! When I do gfortran --...
1
vote
1answer
552 views

How do I compile face_landmark_detection_ex, which requires dlib?

I am given this code for a program called face_landmark_detection_ex. There is no makefile. How can I find out what command I need to type in, in Ubuntu, to produce an executable that I can run? I ...
0
votes
0answers
3k views

Cmake fails with error: “Could not find compiler set in environment variable CC”

I am brand new to Linux/Ubuntu. I installed Ubuntu two days ago to run ROSS (Rensselaer's Optimistic Simulation System) developed by Argonne National Lab. However, I have been running into some build/...
0
votes
1answer
1k views

Unable to install g++ in Ubuntu 17.04

This is my problem: sudo apt-get install g++ Reading package lists... Done Building dependency tree Reading state information... Done g++ is already the newest version (4:6.3.1-2ubuntu1). 0 ...
0
votes
0answers
2k views

installing opencv gives error unsported GCC version despite use of alternative

I'm trying to install opencv 3.1. I have downloaded opencv (https://github.com/Itseez/opencv_contrib/archive/3.1.0.zip) and unzipped it. Now according to various tutorials I should be able to compile ...
0
votes
1answer
180 views

Compiler Problem

I have no clue anymore and I have to ask some clever people now, since I just recently started working with Ubuntu. Soo here is the Problem: I got Ubuntu 16.04 on a Virtual computer via VirtualBox (...
0
votes
0answers
11 views

Unable to install g++ on Ubuntu. Apt-get presents a “Mergelist” problem [duplicate]

$ sudo apt-get update ... Fetched 6,406 kB in 15s (406 kB/s) Reading package lists... Error! E: Encountered a section with no Package: header E: Problem ...
0
votes
1answer
288 views

Cannot compile C++ files on Ubuntu Server 14.04.5 (version.h error)

I have tried using make and G++ to compile C++ files on my Ubuntu VPC... when I attempt to compile it leads with the following error: Daemon.cpp:5:21: fatal error: version.h: No such file or ...
0
votes
0answers
36 views

Can't install g++ with APT due to dependency issue [duplicate]

I type sudo apt install g++ in Terminal, but i get this: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may ...
0
votes
1answer
710 views

Unable to compile Omnet++ in Ubuntu 16.04 - make errors

I've followed installation instructions mentioned in: https://omnetpp.org/doc/omnetpp/InstallGuide.pdf Then followed the instructions mentioned in: http://vikashmainanwal.blogspot.co.il/2014/10/...