Skip to main content

Questions tagged [g++]

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

2 votes
0 answers
278 views

Is it possible to use Libtorch with VS Code?

I have followed the instructions provided by Pytorch to installing C++ distributions of PyTorch: https://pytorch.org/cppdocs/installing.html However, this command produces an error: cmake --build . --...
Mattpats's user avatar
  • 121
1 vote
1 answer
9k 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 ...
Solebay Sharp's user avatar
5 votes
1 answer
15k 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. ...
HerpDerpington's user avatar
0 votes
1 answer
408 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 ...
Eideann's user avatar
0 votes
1 answer
1k 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.
Filip's user avatar
  • 5
0 votes
2 answers
1k 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; ...
galaxy001's user avatar
  • 103
0 votes
1 answer
947 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\...
weirdpusheen's user avatar
0 votes
1 answer
149 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, ...
CiaranWelsh's user avatar
  • 3,276
-1 votes
1 answer
205 views

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

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 ...
Deepam Gupta's user avatar
0 votes
2 answers
388 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"...
Doot's user avatar
  • 123
0 votes
1 answer
112 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:...
Jeff Demanche's user avatar
2 votes
0 answers
495 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 / # ...
Mihir's user avatar
  • 21
0 votes
1 answer
187 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++...
z0zz0's user avatar
  • 1
1 vote
0 answers
150 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 ...
Shashank Kadambri's user avatar
0 votes
1 answer
160 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 ...
Winfried's user avatar
1 vote
1 answer
4k 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 ...
John Lee's user avatar
3 votes
2 answers
3k 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 ...
Georgi Stoyanov's user avatar
1 vote
0 answers
931 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 : ...
wutzebaer's user avatar
  • 437
0 votes
1 answer
993 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 ...
Michel Keijzers's user avatar
1 vote
1 answer
5k 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?
Dave's user avatar
  • 141
0 votes
1 answer
542 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 ...
shawon's user avatar
  • 141
0 votes
1 answer
425 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 ...
baxbear's user avatar
  • 516
-1 votes
1 answer
4k 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 ...
aswine's user avatar
  • 137
3 votes
2 answers
2k 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:...
Lord Rixuel's 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 ...
jww's user avatar
  • 12.3k
1 vote
0 answers
98 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 ...
RatkinHHK's user avatar
0 votes
1 answer
209 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 ...
Austin Biggs's user avatar
2 votes
2 answers
20k 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 ...
Mike Wong's user avatar
  • 131
0 votes
1 answer
760 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). ...
notadam's user avatar
  • 718
0 votes
2 answers
876 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 ...
Stershic's user avatar

15 30 50 per page