Questions tagged [g++]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
180 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.
mrx's user avatar
  • 11
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: ...
wizard accesories's user avatar
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 ...
Rohan Pande's user avatar
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....
Jack Summers's user avatar
0 votes
1 answer
584 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::...
stanley's user avatar
  • 231
-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 ...
FvEldijk's user avatar
  • 357
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 ...
PhysicsInquiries's user avatar
0 votes
1 answer
332 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 ...
BlunterWeb's user avatar
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:
Lucas Dent's user avatar
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() { ...
Valeria's user avatar
  • 101
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 ...
HuaLi's user avatar
  • 1
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. ...
Melonendk's user avatar
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 ...
Anirudh's user avatar
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 ...
DrB's user avatar
  • 1
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
nevil cac's user avatar
0 votes
0 answers
227 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 ...
Phar's user avatar
  • 1
0 votes
0 answers
359 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-...
Chan Kim's user avatar
  • 1,969
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 = ...
Bob Barrett's user avatar
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... ...
Anirudh Salgundi's user avatar
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....
Jorge O-L's user avatar
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 ...
Tak's user avatar
  • 966
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 ...
RonFAA's user avatar
  • 1
0 votes
1 answer
938 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 ...
prism's user avatar
  • 3
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 ...
Radin Zahedi's user avatar
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 ...
Tanus Szabo's user avatar
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 ...
UTSAV PANDYA's user avatar
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://...
SpeedChaser's user avatar
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 -...
Abhishek's user avatar
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 ...
Dario Franzese's user avatar
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 ./...
dawfedora's user avatar
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 ...
digito_evo's user avatar
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 ...
eisha latif's user avatar
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 ...
student_11's user avatar
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 ...
thesavagen's user avatar
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. ...
davidvan's user avatar
0 votes
0 answers
638 views

'cc1obj': execvp: No such file

I'm trying to install cider by using the command pip3 install cider but got x86_64-linux-gnu-gcc: error trying to exec 'cc1obj': execvp: No such file or directory what should I check ? or install ?...
sam's user avatar
  • 1,323
4 votes
1 answer
345 views

Set parameters for Ubuntu's alias

I have an example command as follows: g++ main.cpp -o main -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -I/usr/local/include/opencv4 Running the entire above command will create ...
Claire Duong's user avatar
3 votes
1 answer
4k views

How to install g++-5 on Ubuntu 20.04?

I am trying to compile some source which was written for g++-5. I want to be able to install g++-5 on my Ubuntu 20.04. How can I do this? I was hoping that sudo apt install g++-5 would work. But it ...
Agnishom Chattopadhyay's user avatar
0 votes
1 answer
12k views

C++ Undefined reference to a function

I am using ubuntu 16.04 When I try to compile the program with g++ -g main.cpp -o main This is my g++ version g++ --version g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Copyright (C) 2019 Free Software ...
KuhakuPixel's user avatar
0 votes
1 answer
512 views

Problems when installing g++

I want to install g++ in my Ubuntu 20.04 by typing in the terminal sudo apt-get install g++ but it tells me this: Some packages cannot be installed. This can mean that an impossible situation was ...
HelpNeederStudent's user avatar
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 ...
marwagaser's user avatar
1 vote
1 answer
9k views

Error: Unable to locate package gcc-10 while updating GCC and G++

Hi i am trying to update gcc and g++ on my Ubuntu 18.04. I currently have version 7.5 of both gcc and g++. I found this article where it is written that we can install a gcc and g++ version via a ...
user12002570's user avatar
0 votes
1 answer
66 views

How to compile multiple all testbench components of Systemc

I have been trying to simulate all my testbench components of hierarchiral full adder systemc program. Previously, to simulate a simple systemc filenamed(hello_world.cpp) I have used: $ g++ -g -Wall -...
SWETHA CHILVERI's user avatar
0 votes
0 answers
179 views

Cmake build from source gives problems on make (probably c++14 standard not used)

I just updated my Cmake to the version 3.19 (previously 3.10) from sources. For this I now have two cmake versions the one from before in /usr/bin/cmake and the new one in /usr/local/bin/cmake which ...
Marcel_marcel1991's user avatar
3 votes
1 answer
592 views

How to install github.com/ioi/isolate on Ubuntu

I recently tried to make a C++ judge and heard about a tool called "Isolate" (available here): Run program within a sandbox, so that it cannot communicate with the outside world and its ...
I like eating pizza thursdays's user avatar
0 votes
0 answers
205 views

How to use gcc -7 if a have build essential installed (ubuntu 16.04)

I'm on Ubuntu 16.04 and installed build-essential because I need gfortran, gcc, g++. I'm trying to run Nek5000 but I get an error with makenek: gcc: error: unrecognized command line option ‘-fno-plt’ ...
Gilberto Montiel's user avatar
1 vote
1 answer
6k views

gcc/g++ 10 is installed but I can not use it on Ubuntu 20.04.2 LTS [duplicate]

I used the information here How to install g++ 10 on Ubuntu 18.04? to install gcc/g++ 10 on Ubuntu 20 and when I try to do it again: sudo apt install g++-10 Reading package lists... Done Building ...
newbie's user avatar
  • 113
1 vote
0 answers
4k views

gcc: error trying to exec 'cc1plus': execvp: No such file or directory

i am trying to run the ovs faucet tutorial. One of steps is to compile the faucet container package. I am getting the following error when I tried to run it gcc: error trying to exec 'cc1plus': execvp:...
elitelight's user avatar
1 vote
1 answer
2k views

C++ not able to install 32-bit gcc-9/g++-9-multilib on Ubuntu 18.04

I have multiple version of c++ compilers installed on my laptop. I am trying to build my code using g++-9.3 with a 32-bit compiler. So I tried to install the multilib by using sudo apt-get install gcc-...
r0ng's user avatar
  • 1,037
0 votes
0 answers
65 views

error in installing g++ in ubuntu [duplicate]

i've been traying to install g++ in my VMware ubuntu but i couldn't, i tried two different commands but still it's saying that there is an error, could you please help me with it. when i type sudo apt ...
Zara's user avatar
  • 1

1
2 3 4 5
7