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
0answers
24 views

g++ version does not seem to change even after installation [duplicate]

I currently have the g++ version 5.4.0. I wanted to install 7.3.0 I am using Ubuntu 16.04. I have followed these instructions: Dependency issues while installing gcc 7.3 from Jonathon F's PPA. ...
0
votes
1answer
47 views

How to link installed pakage with g++ / atom with gpp-compiler package?

I can't figure out how to link external libs / installed packages when compiling. I have G++ and atom with the gpp-compiler package by kriscross07 and I want to link my GLWF3 Hello World programm with ...
1
vote
2answers
48 views

g++ and gdb problem: debug symbols for shared libraries not found

I am porting a large set of applications and libraries from Debian 7 to Ubuntu 16.04. This is a GNU autotools project, so libtool is involved. gdb cannot find the symbols for the majority of the ...
0
votes
1answer
78 views

g++ fails with an undefined reference to symbol 'dlclose@@GLIBC_2.2.5' even with '-ldl'

I'm trying to compile a program with GLAD and SDL2 using scons (though scons isn't really relevant since g++ is the issue) scons runs the following command to compile part of the program: g++ -o out/...
0
votes
2answers
78 views

Depencies are not installable

I am trying to install a program with the command: ~/Downloads$ sudo apt install ./argos3_simulator-3.0.0-i686-beta52.deb and I am getting the response (error) of: Reading package lists... Done ...
0
votes
1answer
360 views

How to install GCC6.3.x & G++6.3.x on Ubuntu 16.04

I want to install GCC and G++ 6.3 version. As MATLAB only support this compiler. On launchpad it is not available. I could not find any link which could describe way to install. I could install 6.5 ...
0
votes
1answer
53 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
163 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
118 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? ...
0
votes
1answer
101 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
203 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....
1
vote
0answers
154 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
2k 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
256 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
210 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
40 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
353 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
41 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
144 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
602 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
128 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
319 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
47 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
292 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
893 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
187 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
62 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
141 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
224 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
119 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
398 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
141 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
614 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
171 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: ...
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
62 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
1k 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
346 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
260 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
91 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
310 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
2k 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
1k 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
611 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
2k 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
241 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 ...