Questions tagged [g++]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
63 views

Cannot install g++-10

Running Ubuntu 18.04. I have added ppa:ubuntu-toolchain-r/test. I have successfully installed gcc-10: $ sudo apt-get install gcc-10 Reading package lists... Done Building dependency tree Reading state ...
0
votes
0answers
25 views

How to install gcov that is compatible with gcc version 10.1?

I'm trying to use CLions interface to gcov but I'm not using the default g++ compiler (for Ubuntu 18.04). Therefore my version of gcov (7.5) is incompatible with my compiler (10.1). How can I install ...
0
votes
0answers
30 views

On X86-64 Ubuntu 20.04, how come my 32-bit executable isn't?

I am trying to build a 32-bit executable (to see if it runs faster) on x86_64 Ubuntu 20.04 running on WSL on Windows 10. If I build the same code without the -m32 option in g++, the result runs. If I ...
0
votes
0answers
35 views

Problems installing gcc 8 on Ubuntu 20.04 [duplicate]

I am trying to install gcc-8 and g++-8 on Ubuntu 20.04 (for CUDA) but when I try to install both gcc 8 & 9, I get an error: $ sudo apt -y install build-essential $ sudo apt -y install gcc-8 g++-...
0
votes
0answers
65 views

how can I fix gcc and g++. I use desktop Ubuntu version 18.04

sudo apt-get install gcc g++ git gcc-*-aarch64-linux-gnu g++-*-aarch64-linux-gnu libncurses5-dev Reading package lists... Done Building dependency tree Reading state information... Done x 'g+' ...
1
vote
0answers
197 views

Package 'g++-4.8' has no installation candidate

So i recently updated to Ubuntu-20.04 and my g++-4.8 compiler got deleted when i tried to reinstall it using "sudo apt-get install g++-4.8" i get an error: "Package g++-4.8 is not available, but is ...
2
votes
2answers
345 views

QtCreator not recognizing linked libraries after upgrading Ubuntu to 20.04

I've upgraded from Ubuntu 18.04 to 20.04 and besides some nasty grub issues most things worked out of the box. But my QtCreator (Qt Creator 4.11.0, Based on Qt 5.12.8 (GCC 9.3.0, 64 bit)) is facing ...
0
votes
0answers
32 views

Accidentally replaced /usr/bin/ld with other binary file, installing through binutils just reverts back to what I replaced it with

I accidentally replaced /usr/bin/ld with the lua executable. So when I run ld, it triggers the lua interpreter. When I sudo remove ld and reinstall through: $ sudo apt-get install --reinstall ...
2
votes
0answers
245 views

Can we install older versions of gcc and g++ on ubuntu 20.04

I currently have Ubuntu 19.10 with gcc 9.1.2 I want to install previous versions of gcc for CUDA 8 (gcc 5 in this case). But I am getting this error: (base) ➜ ~ sudo apt-get install gcc-5 g++-5 ...
0
votes
1answer
406 views

How can I install a specific version of gcc on ubuntu 18.04

I'm trying to install gcc 7.3.0 on ubuntu 18.04. Ubuntu got updated and now my gcc is 7.5.0. I have seen other questions on stack overflow, but they are either for older versions which their solution ...
0
votes
0answers
61 views

g++-5 on Ubuntu 19.10

I'm currently trying to install some software (NUFEB) onto my home PC which is running Ubuntu version 19.10. This requires my computer to have the GNU C and C++ compilers gcc-5 and g++-5. I do not ...
0
votes
0answers
86 views

unrecognized option --build-id while compiling c++ code using g++

well Im kinda new to ubuntu. I tried compiling a c++ code. it was a simple Hello world code. I entered the following commands g++ temp.cpp and i get the following error message:-- /usr/bin/ld: ...
1
vote
0answers
50 views

g++ cannot find main function for simple “hello world” program

I have been trying to compile a simple hello world program in C++ on my lubuntu laptop. I use the command g++ -o out cta.cpp but I always get the error message below.. /usr/bin/ld: /usr/lib/gcc/...
0
votes
0answers
30 views

Reinstalling g++ and get bus error

Today I removed the g++ package with the commands: sudo apt remove g++ sudo apt purge g++ So, I reinstalled it with: sudo apt-get install g++ sudo apt install build-essential After the ...
1
vote
0answers
322 views

How to downgrade gcc, g++, and gfortran?

I'm trying to install the package mice in Rstudio but the installation fails and shows the error /usr/bin/ld: cannot find -lgfortran. I note that there is no directory called /usr/bin/ld in my PC, but ...
0
votes
1answer
111 views

Problem with g++ in Ubuntu 18 LTS [closed]

i'm trying to compiling this class: --> This is the Vector3D.h: #pragma once #include <math.h> class Vector3D{ private: float x; float y; float z; public: Vector3D() : x(0),y(...
0
votes
0answers
86 views

Unable to install g++ in Ubuntu version 18.04. I used the command “sudo apt install g++”

After running: sudo apt install g++ I've got the following error: The following packages have unmet dependencies: g++ : Depends: gcc (>= 4:7.3.0-3ubuntu2) but it is not going to be installed ...
16
votes
1answer
6k views

How to install g++ 10 on Ubuntu 18.04?

I would like to explore concepts and other new features in C++20, provided by g++ 10. However, I cannot seem to find any resources that allows me to apt-get a g++ 10 online? What is the easiest way ...
4
votes
1answer
945 views

How can I force an older version of g++ if I have a newer version?

g++ --version on my home machine reads 7.4.0, but a server I frequently do work on shows 4.8.5. Their servers don't support -std=c++11 compiler flags yet my home machine does. The most recent flag it ...
1
vote
1answer
494 views

Configure error “g++ version cannot be determined”

I am relatively new to using Ubuntu (ver. 18.04) and am trying to install a software package for research work. the package can be obtained from https://github.com/chetzer-ncpa/ncpaprop When i try to ...
2
votes
1answer
48 views

g++ can't compile

make[2]: /usr/bin/g++-5: Command not found CMakeFiles/uwlib.dir/build.make:62: recipe for target 'CMakeFiles/uwlib.dir/src/EvoLogics/command.cpp.o' failed make[2]: *** [CMakeFiles/uwlib.dir/src/...
1
vote
0answers
417 views

Need help installing gcc and g++-4.7 on ubuntu 18.04

Hi I need help installing gcc and g++ -4.7 in order to install matcaffe for my research project. I have tried to install from terminal directly using sudo apt-get install like other post suggest but ...
0
votes
0answers
37 views

How to Install G++ Compiler The Correct way? [duplicate]

When I try to install it with the commands: sudo apt-get install g++ or sudo apt-get install build-essential It shows me an error: Reading package lists... Done Building dependency tree ...
2
votes
1answer
1k views

Error when trying to install g++ in Ubuntu shell in Windows 10 [duplicate]

After downloading the Ubuntu app from the Windows store, I tried to run gcc --version and it showed command gcc not found same was the case for g++. I tried to install using sudo apt install gcc and ...
1
vote
1answer
378 views

how to get gcc/gpp 6 to 9 onto a Xenial system from behind a firewall with apt and gpg?

i tried getting compilers higher than gcc/gpp-5 for Ubuntu 16.04 (xenial). i added these lines to /etc/apt/sources.list deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main deb-...
0
votes
2answers
435 views

Auto compile alias in .bashrc

How do I create an alias in my .bashrc file so that I can compile my C++ program without inputting this much longer command: g++ -o filename filename.cpp Here the file name is variable.
0
votes
1answer
388 views

No .a or .o file created after building the project in Codelite

I have installed Codelite and I have g++ installed on my machine: I've also used the following settings when creating a new codelite project And I 've created a simple project #include <...
0
votes
1answer
875 views

When I wrote the code:- “sudo apt install g++” in ubuntu terminal for installing g++ compiler, then it showed this error

sudo apt install g++ [sudo] password for kpsd4050: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: ...
1
vote
0answers
835 views

Install gcc, g++ and cmake3 [duplicate]

How can I install gcc6.4, g++6.4 and cmake3 on Ubuntu 14.04? I want to rewrite below lines that run on Linux to be run on Ubuntu $ yum install gcc64-c++ libcurl-devel $ export CC=gcc64 $ export CXX=...
1
vote
1answer
4k views

ld cannot find shared library

Note: I visited many topics with questions similar to this one, although solutions chosen as accepted were all things I've already tried, so please, consider this before marking as duplicate. Also, I'...
3
votes
0answers
2k views

G++/GCC installed but still: error trying to exec 'cc1plus': execvp: No such file or directory

Full error message: arm-linux-gnueabihf-g++: error trying to exec 'cc1plus': execvp: No such file or directory So I have gotten this error message while trying to build a c++ project on my machine ...
0
votes
0answers
859 views

“/bin/bash: g++: command not found”

I am new to ubuntu and facing problems in running c++ code. > Executing task: g++ -g hello.cpp -o hello.out && clear && ./hello.out < /bin/bash: g++: command not found The ...
0
votes
1answer
405 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
2k 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 ...
2
votes
1answer
6k 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
2k 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 ...
1
vote
2answers
10k 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
289 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
1k 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 ...
1
vote
1answer
4k 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
399 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-...
2
votes
1answer
631 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
6k 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++...
2
votes
1answer
866 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, ...
-1
votes
1answer
813 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
70 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
397 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
902 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 '...
1
vote
1answer
121 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
901 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
2 3 4 5 6