Questions tagged [g++]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

Cannot find g++ after msys2 install

I want to install g++ so I can compile and run C++ code in VScode. I started by trying to follow the VSCode-provided guide which states I need to install mysys. I tried installing msys2 per the given ...
user avatar
3 votes
1 answer
656 views

How can I properly configure the g++ include path with mingw64?

I have installed msys2/mingw64 because I need the g++ compiler. Now, I want to compile some c++ oce which requires openblas. I have installed the package using pacman -S mingw-w64-x86_64-openblas. ...
user avatar
0 votes
1 answer
37 views

Installing gcc 4.7.2 in MacOS (Monterrey)

I am trying to install gcc 4.7.2 (I need this version in order to be able to compile an old code), but I can not seem to find a proper way to do it. It looks like the only available options is to do ...
user avatar
0 votes
0 answers
411 views

'g++' is not recognized as an internal or external command in Sublime Text 3

how do i fix this? i need help to be able to run c++ code. i think i know what the general idea on how to do but i need it to be more specific. i've downloaded a zip file of mingw from this link: ...
user avatar
  • 1
0 votes
1 answer
369 views

How to compile text file to exe file with G++

I have c++ code saved in .txt file. Can i somehow format it with g++ compiler or i\ must change it to file.cpp? Is there why how to compile a .txt file with g++? Thanks for answare.
user avatar
  • 5
0 votes
2 answers
365 views

How can I get g++ 7+ on windows 10?

I have just installed g++ using MinGW. When I tried g++ --version it says, that it is 6.3.0: g++ (MinGW.org GCC-6.3.0-1) 6.3.0 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; ...
user avatar
  • 103
0 votes
1 answer
83 views

What is a purple file from the LS command?

I am working on a c++ project and had a failed compilation (normal kind of errors). When I ran ls (a bit of a habit), it showed a file with a seemingly random sequence of characters: '!4'$'\377\377\...
user avatar
  • 63
0 votes
1 answer
40 views

Can g++ compilers be used to build linux software on macos?

On windows I am able to develop for linux using WSL2. I ususally use CLion which allows me to switch between msvc and g++ with a flip of a switch. Is it possible to do the same thing on Mac? If so, ...
user avatar
  • 1,736
0 votes
1 answer
35 views

Conditional statements with braces versus without braces - which is fast in C, C++

I know this is silly, but I'm quite curious to know that is there any speed difference using conditional statement (i.e. for, if, while, do while) in C++ with braces and without braces. FYI : I know ...
user avatar
0 votes
1 answer
140 views

Notepad++ NppExec: Redirect to file using '>' registers it as an argument and does not work, even though it works on the command line

Looking at the code below, it simply converts a c or c++ file, e.g. main.cpp into its state after preprocessing, e.g. main_pp.cpp. However, running the command it generates, g++ -E "main.cpp"...
user avatar
  • 101
0 votes
1 answer
36 views

Trouble updating G++ to version >5 using apt-get in Windows Subsystem for Linux

Context: I'm trying to run CMake as described here (under Linux-installing dependencies > Building OpenVDB). I'm in WSL. When I do so I get this error: CMake Deprecation Warning at CMakeLists.txt:...
user avatar
2 votes
0 answers
231 views

Cannot install g++6 on alpine3.9

I need to install g++6 for building spidermonkey->couchdb on alpine3.9. I am unable to install it. Note that it is on the package list available on alpine 3.9 here. $ docker run -ti alpine:3.9 sh / # ...
user avatar
  • 21
0 votes
1 answer
143 views

Charm4py/charm++, GCC error when installing

firstly I am going to explain the issue and at the bottom you'll find the question/-s. I'm trying to install charm4py using pip/pip3/apt (all of em), after 1.5 hours it fails and I notice it's charm++...
user avatar
  • 1
1 vote
0 answers
82 views

Not able to run C++ code on Windows 8.1 Pro

I have installed the g++ compiler on my PC at my work place, downloaded from https://osdn.net/projects/mingw/releases/ here. I've also set the system path variable, but when I try to compile my code ...
user avatar
0 votes
1 answer
124 views

R g++ error installing survey package

i get a non-zero exit status by installing the survey-package in R version 3.5.2 on ubuntu 18.04. the problem seems to be related to g++ and the package minqa. in the output of the installation ...
user avatar
1 vote
1 answer
3k views

What exactly is g++?

There's one thing that I don't understand - and that is the question what is g++? I've searched for the wide web (in every way I've thought of, at least). No result yielded (the closest that I've ...
user avatar
3 votes
2 answers
2k views

How do I compile FFMPEG & Libaom without PIE

I am trying to compile FFMPEG and Libaom from source apparently because the gcc and g++ compilers in Ubuntu 18.04 by default has enabled the following option by default: --enable-default-pie $ gcc -v ...
user avatar
1 vote
0 answers
860 views

Docker container with centos 6.6 and c++

I'm trying to create a docker contaienr with CentOS 6.6 and c++: Step 1/37 : FROM centos:6.6 ---> 3d7ac13b921a Step 2/37 : RUN yum -y update ---> Using cache ---> b41e216c79de Step 3/37 : ...
user avatar
  • 427
0 votes
1 answer
772 views

Eclipse: g++: command not found

I have installed Eclipse via System Workbench for STM32. Meaning I have an icon now named System Workbench for STM32, and when I open it Eclipse opens. With that IDE I can successfully create ...
user avatar
1 vote
1 answer
3k views

How do you change versions of gcc on windows?

I've been using g++ 4.8.1, mingw. Now, I've just updated to 6.3.0, however when I use g++ in command prompt it still seems to use the older version. How do you change between versions on windows?
user avatar
  • 131
0 votes
1 answer
333 views

What is the windows cmd command equivalent to ubuntu command timeout 5s a.exe < input.txt

I am developing an online judge for my university. I need to timeout every program after 5 seconds for measuring time limit. my input is input.txt file and i am compiling and getting output in ubuntu ...
user avatar
  • 141
0 votes
1 answer
260 views

Windows equivalent for unix regular expressions

Is there an replacement for **/*.* **/*.cpp so that i can do sth like this: gcc -std=c++14 -I ./include/ -o ./bin/main ./src/**/*.cpp (the way i go when i don't use any makefile) on windows i did ...
user avatar
  • 506
-1 votes
1 answer
3k views

How can I compile C++ code into an independent Windows executable? [closed]

I've got a C++ program that I can compile and run on Mac OS 10.11 using g++. I also was able to compile and run it on Windows 10 using Visual Studio. However, when I tried to run the .exe file on a ...
user avatar
  • 127
3 votes
2 answers
1k views

compilation on cygwin64 doesn't work with g++ 4.9.2

I have GNU make version 4.0 g++/gcc version 4.9.2 Command make clean works perfectly But when I use command make to compile I got this error C:/cygwin64/lib/gcc/x86_64-pc-cygwin/4.9.2/cc1plus.exe:...
user avatar
0 votes
1 answer
4k views

Compiler tools, execv and "exec format error" under s390x chroot

I have a Debian 8 x86_64 machine with two chroot environments. The first is armel and the second is s390x. armel was installed last week, and s390x was installed recently. armel is fine both before ...
user avatar
  • 11.1k
1 vote
0 answers
86 views

G++ Compiler Stalls [CodeBlocks]

I am using CodeBlocks under Kali Linux and the g++ compiler stalls. SOMETIMES, I hit compile and at the bottom I get the message: g++ -fexceptions ...etc build main.o ... and NOTHING happens. If I ...
user avatar
0 votes
1 answer
188 views

Switch Server to use GCC version 4.8.1

I'm banging my head against a wall, I followed the instructions detailed here: https://superuser.com/a/677640 When I ran yum install devtoolset-2-gcc-4.8.1 devtoolset-2-gcc-c++-4.8.1 this was the ...
user avatar
2 votes
2 answers
17k views

How do I compile 64bit program with gcc/g++ on a 64bit Linux?

I'm using Ubuntu 10.04 LTS, and want to make a program to run on a large Debian server that has 300GB memory. With command: g++ Encoder.cpp -std=c++0x -m64 -o Encoder.o it returns something like ...
user avatar
0 votes
1 answer
721 views

Compile C++ 11 on Damn Small Linux?

DSL does not include any compiler (aside from a very basic ANSI C compiler), so I need to install g++ on it. Unfortunately the only gcc/g++ I could find for DSL linux is a version from 2006 (here). ...
user avatar
  • 708
0 votes
2 answers
645 views

Why does a c++ code run significantly longer on one computer than another? [closed]

The code is exactly the same -- I copied it from one computer to another. The code is compiled with g++-4 (4.9.1) obtained from fink on OSX on both machines, and is not run in parallel. Compiler ...
user avatar
15 votes
2 answers
7k views

Python ./configure does not find g++ compiler

I'm trying to compile Python 3.4.1 on an emulated ARM machine (with Debian 7). ./configure gives me checking for g++... no but g++ is installed. So what could be the problem? I know it's not ...
user avatar
8 votes
2 answers
25k views

Install GCC / G++ Version 4.9 in Linux Mint

I always like to have the latest version of things, particularly if that thing is gcc, g++ and there has recently been a revision to the c++ standard. I have forgotten what ppa's I need to add to my ...
user avatar
  • 1,957
0 votes
1 answer
3k views

update gcc /g++ on CentOS 5.9

I would like to update gcc/g++ on my CentOS 5.9. The version I have is 4.1.2 : Would it be possible to update it to 4.4.7 like CentOS 6.4 WITHOUT updating the entire operating system? It looks to me ...
user avatar
3 votes
1 answer
4k views

Installing a GCC/G++ for my mac OSX 10.8

My problem is simple, I would like to get the OSX/BSD version of the GCC and G++ compilers from the GNU.org website. However after some research (as described below) I learned that Apple uses LLVM ...
user avatar
  • 145
1 vote
2 answers
2k views

downgrade gcc/g++ after upgrading; compiler error

I just upgraded gcc/g++ from 4.4 to 4.8 (via this method How can I update gcc to the latest version in Ubuntu 10.04?). I realized that 4.8 is going to break a lot of my code and now I want to roll ...
user avatar
  • 2,441
1 vote
1 answer
2k views

Sublime Text manually specify g++ location

Long story short, I'm using sublime to write some small C++ programs in my spare time. I'm currently on a Windows 7 box and I do not have administrative rights to adjust the Path Environment Variable ...
user avatar
3 votes
2 answers
18k views

Version `GLIBCXX_3.4.15' not found in CentOS (in file /usr/lib/libstdc++.so.6)

I try to use a program and I get the following error. /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found Under /usr/lib64 the libstdc++ I see is libstdc++.so.6.0.13 (and a soft link). ...
user avatar
0 votes
1 answer
870 views

Cygwin - updating an old verison of g++

I installed Cygwin but it appears the mirror I chose my packages from had very old versions on it. I am running g++ 3.4.4 but the latest release is 4.8.0 Whenever I went on the g++ website the .tar's ...
user avatar
  • 11
1 vote
2 answers
1k views

How to install Valgrind on debian 6 ARM processor?

Title says it all. This file doesn't appear in 'apt-cache search'. My sources.list: deb http://ftp.us.debian.org/debian squeeze main non-free contrib How do I get this installed? Do I have to ...
user avatar
  • 347
2 votes
2 answers
8k views

alias gcc='gcc -fpermissive' or modifying ./configure script

I am compiling quite big project from source. The compilation always ends with: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] I have already compiled this project one year ...
user avatar
  • 21
2 votes
2 answers
4k views

Add a permanent compiler option to g++

I am using a g++ 4.7 on Ubuntu 12.04 to compile my c++ code, and it won't be compiled unless an -std=gnu++11 option is added to my command like this: g++ -std=gnu++11 main.cpp Is there a way to add ...
user avatar
  • 123
0 votes
1 answer
274 views

Unable to install software on Ubuntu 8.04

I have recently installed 8.04 Ubuntu onto an industrial board and applied the vendor kernel modifications to it. I need to develop applications on another desktop to run on this board in C++ but I am ...
user avatar
1 vote
1 answer
853 views

Linking WXWidgets in C++ on Mac OSX 10.7 objects not working

For a cross-platform project, we are using wxwidgets to create a cross-platform GUI in c++. WxWidgets was installed on Mac OSX 10.7 using macports. We have no problems with compiling our source-code ...
user avatar
  • 201
1 vote
6 answers
1k views

g++ compiler : unable to compile

This is the first time that I'm using the g++ compiler to compile my c++ programs. I have installed cygwin g++. and I'm trying to run a very simple program to display "hello", to see wether it would ...
user avatar
1 vote
3 answers
10k views

Cannot install g++ on ubuntu

I don't have g++: erelsgl@ubuntu:/etc/apt$ which g++ erelsgl@ubuntu:/etc/apt$ erelsgl@ubuntu:/etc/apt$ g++ The program 'g++' can be found in the following packages: * g++ * pentium-builder Try: ...
user avatar
1 vote
2 answers
4k views

Can't install build-essential on Ubuntu Jaunty 9.04

Here's my /etc/apt/sources.list: #deb cdrom:[Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1)]/ jaunty main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade ...
user avatar
  • 143
0 votes
1 answer
1k views

g++ in Knoppix 6 LiveCD

To avoid the inevitable, let me put this in context. I am instructing an Intro to Unix course this semester and the students are using Knoppix 6.4.3 off the LiveCD. They are not required to install ...
user avatar
0 votes
1 answer
915 views

G++ Compile and Run Without Output

This is just a convenience thing. Is there a way to use C++ sort of like an interpreted language, only in the sense that you could compile and run it without outputting a binary file. This is of ...
user avatar
  • 2,269