Questions tagged [g++]

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

Filter by
Sorted by
Tagged with
1 vote
2 answers
49 views

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://security.ubuntu.com/ubuntu bionic-security InRelease Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease Hit:3 http://...
user avatar
0 votes
0 answers
21 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 -...
user avatar
-2 votes
0 answers
18 views

undefined reference to `tinyxml2::XMLDocument::LoadFile(char const*)'

I was running the xmltest2.cpp using visual studio code 2022. xmltest2.cpp saved on the same folder where tinyxml2.cpp and tinyxml2.h are included. I got the error listed below. The compiler is g++ ...
user avatar
  • 1
0 votes
0 answers
107 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 ...
user avatar
0 votes
1 answer
68 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 ./...
user avatar
0 votes
0 answers
23 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 ...
user avatar
0 votes
2 answers
295 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 ...
user avatar
0 votes
0 answers
37 views

A tricky matter in Geany

I typed these code in Geany: void copy_fct() { int v1[10] = {0,1,2,3,4,5,6,7,8,9}; int v2[10] = {0,0,0,0,0,0,0,0,0,0}; // to become a copy of v1 for(auto i=0; i!=10; ++i) // copy ...
user avatar
  • 189
0 votes
0 answers
30 views

Failed to fetch Hash Sum mismatch trying to install g++ [kubuntu 20.04 dual boot] [duplicate]

I have recently begun using Linux, ie, kubuntu 20.04 (by recently I mean today) and i was trying to install g++ compiler for c++using $ sudo apt install g++ but i get this error E: Failed to fetch ...
user avatar
2 votes
0 answers
158 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 ...
user avatar
0 votes
2 answers
3k 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 ...
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. ...
user avatar
0 votes
0 answers
163 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 ?...
user avatar
  • 1,017
0 votes
0 answers
152 views

Getting E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing when trying to install g++ [duplicate]

So I am trying to install gcc to install g++ on WSl-2 for Windows10 (which is basically a real Linux kernel) and I get this unable to fetch archives error try apt-get update error message after a ...
user avatar
4 votes
1 answer
253 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 ...
user avatar
2 votes
1 answer
431 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 ...
user avatar
-1 votes
1 answer
5k 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 ...
user avatar
0 votes
1 answer
396 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 ...
user avatar
0 votes
2 answers
893 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 ...
user avatar
2 votes
1 answer
3k 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 ...
user avatar
0 votes
1 answer
44 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 -...
user avatar
0 votes
0 answers
73 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 ...
user avatar
0 votes
0 answers
44 views

compilling with gcc and g++: vp8_multi_resolution_encoder - compiling with gcc showing so many error but g++ showing only one

First of all, i have built libvpx for x86_64-linux-gcc. then Trying to use examples/vp8_multi_resolution_encoder.c. I need to convert a a video file into multiple resolution using vp8 encoder. I have ...
user avatar
3 votes
1 answer
313 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 ...
user avatar
0 votes
0 answers
131 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’ ...
user avatar
1 vote
1 answer
3k 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 ...
user avatar
  • 113
1 vote
0 answers
1k 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:...
user avatar
1 vote
1 answer
1k 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-...
user avatar
  • 977
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 ...
user avatar
  • 1
0 votes
1 answer
76 views

Is "Ubuntu Desktop for Developers" different from "Ubuntu Desktop"?

Is "Ubuntu Desktop for Developers" different from "Ubuntu Desktop"? If so, how do I download the Developers' version. I want to make sure that I get things like gcc, g++, gdb, ...
user avatar
0 votes
0 answers
75 views

Installing g++-7 without access to the internet

I have a problem ;) My wi-fi adapter has stopped working out of the blue and since I've no wire here I can't access the Internet from my Ubuntu machine. I've found the following command to fix the ...
user avatar
  • 111
0 votes
0 answers
41 views

Why free() coredumps on one but not the other?

I have this very simple source code used as a test program: #include <stdio.h> #include <stdlib.h> int main() { FILE *fp; fp = fopen("file.txt", "w"); ...
user avatar
  • 350
0 votes
1 answer
4k views

cmake cannot find c compiler even though gcc and g++ are installed

I am using Ubuntu 18.04 and I am trying to install cmake by executing the command: ./bootstrap But I am getting an error: Error when bootstrapping CMake: Cannot find appropriate C compiler on this ...
user avatar
2 votes
1 answer
10k 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 ...
user avatar
  • 21
0 votes
1 answer
5k views

How to update c++ or g++ to version 14 or above? [closed]

How to update or install g++ 15 in Ubuntu 20.04?
user avatar
1 vote
1 answer
2k views

Installing gcc-8 g++-8 on ubuntu 18.04

Hi I tried installing gcc-8 and g++-8. It is giving below error $ sudo apt-get install gcc-8 g++-8 -y Some packages could not be installed. This may mean that you have requested an impossible ...
user avatar
  • 111
0 votes
0 answers
227 views

Cannot install old versions of gcc

I need gcc-6 and g++-6 to compile a specific program (related with CUDA), I am tried to follow these instructions but for some reasons I get the following: > sudo apt-get install gcc-6 g++-6 -y ...
user avatar
1 vote
1 answer
301 views

Newbie: How to use QMAKE to compile and install FaustLive on Ubuntu Studio 20.04? Can't create Makefile with qmake w/ linux-g++

FaustLive is an open source prototyping environment for Faust (open source, compiled audio programming language). Here is FaustLive's GitHub: https://github.com/grame-cncm/faustlive After successfully ...
user avatar
  • 203
5 votes
2 answers
23k views

How do I install gcc 10.2 with sudo apt-get install gcc-x g++-x?

I was able to install gcc 10 but I need 10.2 not 10 and it keeps telling me gcc10.2 does not exist, well it does and I tried installing it by compiling and building it in the command line however that ...
user avatar
  • 106
1 vote
1 answer
496 views

cannot use log4cplus on Ubuntu 20.04

here's my program: #include <string> #include <log4cplus/logger.h> int main() { log4cplus::Logger::getInstance(std::string("main")); } build: $ g++ main.cpp -llog4cplus /...
user avatar
  • 151
2 votes
0 answers
206 views

Trying to build with boost filesystem: relocation ... can not be used when making a shared object; recompile with -fPIC

Ubuntu 18.04, boost 1.65, g++ 7.5.0, cmake 3.10.2, GNU make 4.1. Pretty much everything at the default version for ubuntu 18.04. I'm trying to port software that uses a number of different boost ...
user avatar
6 votes
2 answers
2k 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 "...
user avatar
  • 161
0 votes
2 answers
400 views

`g++` commands isn't working and APT is reporting `g++` is installed

I installed Ubuntu 20.04 and I installed g++ using sudo apt install g++ sudo apt install build-essential but when I want to check the version using this command g++ --version it showed me and also ...
user avatar
-1 votes
1 answer
505 views

makefile shows error in g++ how to solve it

I am following the instructions in this tutorial https://github.com/tukl-msd/DRAMPower. When I do make -j4 an error message appeared to me g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-...
user avatar
0 votes
2 answers
1k views

g++ not detecting gtkmm [duplicate]

I have installed gtkmm using apt-get install libgtkmm-3.0-dev. When I try to compile using g++ test.cpp 'pkg-config gtkmm-3.0 --cflags --libs', I get error saying g++: error: pkg-config gtkmm-3.0 --...
user avatar
  • 101
1 vote
1 answer
2k 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 ...
user avatar
3 votes
2 answers
5k 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 ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
4 votes
0 answers
4k 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 ...
user avatar
  • 41
6 votes
3 answers
5k 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 ...
user avatar

1
2 3 4 5
7