Questions tagged [g++]
G++ is the C++ front-end of the Gnu Compiler Collection (GCC)
322
questions
6
votes
2
answers
4k
views
Getting the most recent releases of gcc / g++ (11.0 or 10.2) on Ubuntu 20.04 LTS
I'd like to get the latest releases of g++ (and clang) via package manager (apt).
Currently I need to compile gcc/g++ on my own which needs really a lot of time.
Are there any repositories with "...
-1
votes
1
answer
179
views
How to install `g++12` on Ubuntu 20.04.6?
How can I install g++12 on Ubuntu 20.04.6?
I tried a few ways on google but none seems to work.
0
votes
0
answers
137
views
unable to compile anything after installing cpr library #
sudo g++ -o /usr/local/bin/t1 '/home/ubuntu/Desktop/test1.cpp'
I am encountering an error while attempting to compile any cpp file, regardless of which one it is. The error message reads:
"as: ...
3
votes
1
answer
7k
views
sudo apt get-install g++ unmet dependencies
Looked through a few questions with similar issues and none of the solutions have worked. The issue is:
$ sudo apt-get Install g++
The following packges have unmet dependencies:
g++ : Depends:g++-4.8 ...
2
votes
0
answers
178
views
Is there any way to ensure that few symbols of static library get definitely loaded into .so file?
We have a huge amount of cpp files and taking a piece of code where we need some clarification regarding that. As we have cpp files we compile those into multiple static libraries and those result ...
0
votes
2
answers
2k
views
g++ -- Undefined Reference to main in 86_64-linux-gnu/Scrt1.o:
I am trying to compile a simple C++ Hello World program to test my environment, however, whenever I try, I get this Error:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1....
58
votes
1
answer
70k
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 ...
0
votes
1
answer
583
views
How to make g++ use the C++20 language standard when compiling from code-blocks in Ubuntu 22.04
Just started learning c++ and it is recommended to compile code using the c++20 standard and use code::blocks as the editor.
I checked the man pages of g++ and it is using c++17. I am using code::...
-1
votes
1
answer
34
views
Why does c++ app launched from the Netbeans use Netbeans install dir?
When I run a simple application that uses a library, Ogre3D in my case, from NetBeans, it breaks with the following message:
Error occurred during execution: InternalErrorException:
Could not load ...
0
votes
0
answers
216
views
Binary files not being generated
When I try to compile a c, c++, or fortran code no binaries are generated and no errors are thrown by the compilers neither. This seems to be independent of the compiler. For example, below I try to ...
0
votes
1
answer
331
views
"make" command not working
I'm currently trying to install graphics.h to do C programming, but I've been having a problem that I've been unable to solve so far.
Every tutorial explaining the process is the exact same, and they ...
0
votes
0
answers
43
views
Errors when installing g++
I honestly have no idea what I'm doing here. I'm trying to install g++ so I can run c++ code and its not working at all.
Here are the errors I'm getting:
0
votes
0
answers
396
views
Broken compiler: fatal error: _mingw.h: No such file or directory
I have broken my compilation and not sure if it is possible to fix it without reinstalling everything from scratch.
I cannot compile the simplest program:
#include "math.h"
int main()
{
...
0
votes
0
answers
24
views
I encountered these problems when I went into the manually built kernel in grub for Ubuntu 23.04 Server
List item
BUG: KCSAN: data-race in __hrtimer_run_queues / hrtimer_active
List item
BUG: KCSAN: data-race in tick_sched_do_timer / tick_sched_do_timer
List item
BUG: KCSAN: data-race in ...
0
votes
0
answers
50
views
Trying to compile with make but missing functions like offsetof
So im trying to create an SRT server to test things out with livestreams etc and i found srt-live-server and cloned that from github. I already installed SRT and compiled and make'd installed that. ...
5
votes
3
answers
18k
views
How to install clang-14 on Ubuntu 18.04?
Can you help me install clang-14 on Ubuntu 18.04? I think I need a valid repo as apt-get install clang-14 does not work.
$ cat /etc/issue
Ubuntu 18.04 LTS \n \l
$ sudo apt-get update
Hit:1 http://...
0
votes
0
answers
596
views
Problem in installing GCC (G++) 5 in ubuntu 22.04
I needed gcc 5 on my ubuntu 22.04. I tried using "sudo apt-get install gcc-5 g++-5" but this output is coming:
sudo apt-get install gcc-5 g++5
Reading package lists... Done
Building ...
0
votes
0
answers
78
views
sudo apt-get install g++ FAILS ... don't know what to do [duplicate]
I'm trying to install the g++ compiler on Ubuntu 22.04.1 LTS, and I get the following:
$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree... Done
Reading state ...
0
votes
0
answers
435
views
trying to install gcc and g++ on ubuntu 22.04.2 is failing due to 404 not found
trying to install gcc and g++ on ubuntu 22.04.2 is failing due to 404 not found from http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.15.0-25.25_amd64.deb
Please help
0
votes
0
answers
225
views
gnome-terminal and zenity will not install
I was tasked to update an nvidia jetson nano from Ubuntu 18 to 20.04. I followed this (https://qengineering.eu/install-ubuntu-20.04-on-jetson-nano.html) guide step by step, but while I was following ...
0
votes
0
answers
358
views
No rule to make target '/usr/include/c++/8/x86_64-redhat-linux/bits/c++config.h (after installing g++-8 on ubuntu 20.04)
On my ubuntu 20.4 machine, to try building a Makefile based program, I tried 'make' but found it needs g++-8. So I added 'universe' repository following this and installed g++8 by
sudo apt install gcc-...
0
votes
1
answer
1k
views
Unable to install gcc-8 g++-8 in Ubuntu 20.04
I am trying to install gcc-8 g++-8 on my Ubunutu 20.04 but I cannot as shown below. Any advice?
sudo apt install gcc-8 g++-8
Reading package lists... Done
Building dependency tree
Reading state ...
296
votes
9
answers
707k
views
How to choose the default gcc and g++ version?
So I have installed gcc-4.4 and gcc-4.3 (same for g++). Now as far as I remember there is a tool in Ubuntu which sets the symlinks for you if you just tell it which version you want. However it does ...
0
votes
0
answers
19
views
using g++ compiler
I have this simple program named Conversion.cc on my Desktop &.show below
//
// Conversion - Program to convert temperature from
// Celsius into Fahrenheit:
// Fahrenheit = ...
7
votes
1
answer
25k
views
Cannot install g++ because packages g++, libqt4-opengl, and libqt4-svg have unmet dependencies
While trying to compile a program with the following command:
g++ -o <output_file> <my_file.cpp>
I found the following report....
The program 'g++' can be found in the following packages:
...
0
votes
1
answer
28k
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 ...
4
votes
1
answer
5k
views
Need gcc and g++ 4.8 in Ubuntu 22.04.1
I am currently in Ubuntu 22.04.1 version, but I use a software which strictly needs gcc 4.8 (as per installation guide). How can I install it?
sudo apt-get install g++-4.8
Reading package lists... ...
1
vote
0
answers
777
views
gdb Installation Error -- libc6-dev
UPDATE: I have re-installed (3 times) Ubuntu, and performed sudo apt policy libc6 libc6-dev with this output:
libc6:
Installed: 2.35-0ubuntu3.1
Candidate: 2.35-0ubuntu3.1
Version table:
*** 2....
0
votes
0
answers
162
views
G++ Causing Struct Redefinition Errors in "type_traits.h" and Other Include Files
I have "been tasked" with trying to build old software (VERY old software, in fact, not compiled since 2014) on our newer platform, specifically using g++ 9.4.0 in Ubuntu 20.04. While doing ...
16
votes
3
answers
118k
views
fatal error :"python.h" no file or directory?
While looking for a solution for the Hungarian problem, I found this GitHub link.
I went through the readme.md file and I performed everything described there. After copying hungarian.so into my ...
0
votes
3
answers
5k
views
C compiler cannot create executables Ubuntu 16.04 gcc v9.3.0
I am trying to run the ./configure command for the cmph_2.0 library I downloaded. The gcc and g++ versions are 9.3.0 and I am using Ubuntu 16.04. However, I am getting the below error:
This file ...
5
votes
0
answers
997
views
Can we install older versions of gcc and g++ on ubuntu 20.04 [duplicate]
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
1
answer
511
views
g++4.9 -fvtable-verify link error: cannot find vtv_start.o
I am running g++ 4.9.2.0ubuntu1~14.04 (installed from the toolchain ppa: ppa:ubuntu-toolchain-r/test), and I want to use the Virtual Table Verification (VTV) feature (-fvtable-verify in C++ dialect ...
0
votes
1
answer
937
views
collect2: fatal error: cannot find ‘ld’ compilation terminated
I accidently overwrote the ld file in /usr/bin. I then removed the file and reinstalled binutils. Now I get the error in the title when I try to compile a C++ file with g++.
The ld file is present in ...
1
vote
0
answers
63
views
Is g++11 slower than g++9?
Recently I have upgraded my Ubuntu 20.04 to 22.04 and ran into some problems. I have noticed g++11 in my computer compiles codes so slowly, even for simple codes, while g++9 in Ubuntu 20.04 had a much ...
1
vote
0
answers
5k
views
How to Add a New Path to pkg-config?
I've just start using GNU make because of a software package I'm trying to install. The tutorial is really good, but for some reason I'm not able to do it properly. I downloaded the files, extracted ...
1
vote
2
answers
2k
views
How to solve "Package 'g++-8' has no installation candidate" error on Ubuntu 22.04?
I am using the gcc/g++ compilers as a part of the OpenFace installation process on my Ubuntu 22.04 based system. While downloading and installing the gcc, it automatically downloads the latest g++-11 ...
1
vote
0
answers
428
views
/usr/bin/ld: cannot find -lopenblas collect2: error: ld returned 1 exit status
I am trying to compile a C++ program that uses Armadillo C++ library for linear algebra & scientific computing. When I give command :
g++ gen_data.cpp -o test -DARMA_DONT_USE_WRAPPER -lopenblas -...
0
votes
0
answers
2k
views
How to downgrade to GCC v.7 (Ubuntu 22.04 LTS)?
I was using g++ v11 and got a compiler error (" *internal compiler error: in expand... ") which as far as I read was introduced in version 8 of g++.
So I tried to downgrade to g++ v7 just to ...
1
vote
1
answer
1k
views
g++ can't find -ludev, but libudev.so is there
I'm getting an error I can't understand.
I'm playing with a new package that runs some hardware over a USB port.
So I try to compile one of their simple example programs:
$ make example1
mkdir -p ./...
30
votes
2
answers
51k
views
What exactly does gcc-multilib mean on Ubuntu?
After hanging long time with older Ubuntu (v.12) I'm updating to v.16 and am very confused with mentions of "gcc-multilib".
Is this actually Apple's "fat binaries" or "universal binaries" model ...
6
votes
4
answers
13k
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 (&...
0
votes
0
answers
24
views
How to update GCC to 11.2 [duplicate]
Today I installed Ubuntu 20.04 (first time using Linux) and I'm having trouble with updating GCC to 11.2 (latest stable version). I checked another question and tried it but after updating it, it's ...
2
votes
1
answer
17k
views
`GLIBCXX_3.4.26' not found
usr/local/MATLAB/R2018b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by /usr/local/lib/libIlmImf-2_5.so.25).
I am using this
to install gcc 9.1.0 as ...
0
votes
2
answers
4k
views
Errors and issues when install G++ on Ubuntu
Trying to install g++ when I run into this error:
$ sudo apt-get install g++
[sudo] password for eisha:
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
5
votes
2
answers
12k
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
4
answers
3k
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.
2
votes
0
answers
233
views
problem with making a c++ project with G++
I am trying to build cascade library using G++ 8.3.0. In the documentation they mention that it was tested on G++ 4.7.2. My question is, is it necessary to downgrade to 4.7.2? if so could you please ...
4
votes
2
answers
13k
views
I am using ubuntu 20.04 LTS trying to get from GCC 9.4 to gcc 10 or higher
sudo apt-get install gcc-10 g++-10:
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-10 is already the newest version (10.3.0-1ubuntu1~20.04).
gcc-10 ...
0
votes
0
answers
27
views
How do I make g++ 10 my default c++ compiler [duplicate]
I am using 20.04 and I have g++ 10 installed, but when I use g++ --version it says 9.3. Also, I can't use any c++ 20 in my code in either IDE I use. Please let me know how I make g++ 10 the default. ...