Questions tagged [gcc]

GNU Compiler Collection, a family of compilers for various languages from the GNU Project. Questions about gcc should be limited to installation and basic usage/configuration.

Filter by
Sorted by
Tagged with
3 votes
1 answer
5k views

Uninstall gcc from source

For fun, I compiled and installed gcc 4.7.2 in ~/build, which contains bin, doc, lib, include, man, share, et al. directories, all of which are added to the appropriate environment variables. Now I ...
0 votes
1 answer
4k 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 ...
0 votes
0 answers
9 views

shc & gcc : Any use for the *.x.c. file that's created?

shc for "compiling" bash scripts, I end up with two files. One is obscured version of my bash script which works great, I also get an intermediate file *.x.c.. I say it this way because I'...
0 votes
0 answers
56 views

ubuntu 23.10. Error updating the kernel

Prop. of my Ubuntu PRETTY_NAME="Ubuntu 23.10" uname -r 5.15.0-72-generic Error updating the kernel to version 6.5 dkms/anbox-ashmem/1/build/make.log DKMS make.log for anbox-ashmem-1 for ...
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?
1 vote
1 answer
3k views

What is the best way to speedup GCC?

Every time I compile my code in GCC it takes about a minute. What is the best way to speed this up? Should I just buy a newer faster computer?
0 votes
1 answer
4k views

Core temperature above threshold cpu clock throttled while upgrading gcc compiler

I have a Dell laptop and i am using CentOS 6.9 in it for personal use which was working very fine till yesterday, when i tried to upgrade default gcc compiler (4.4.7) to 4.9.x version.. I've ...
4 votes
1 answer
7k views

Can't install gcc with cygwin on Windows 10

After installing cygwin on Windows 10, I tried to install gcc by cd C:\cygwin C:\cygwin\setup-x86_64.exe -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel ...
0 votes
0 answers
13 views

Measure the Max Memory of a running process in gcc-bookworm Docker image?

I found many resources to use valgrind or /usr/bin/time. However, I need to perform this task in the container of the official Docker image for GCC: https://hub.docker.com/_/gcc This image is based on ...
2 votes
2 answers
18k views

How to properly upgrade gcc on Centos 7?

I did this to upgrade gcc from 4.8.5 to gcc 7: sudo yum install centos-release-scl sudo yum install devtoolset-7-gcc* source /opt/rh/devtoolset-7/enable This does give me the gcc 7 in the current ...
2 votes
1 answer
858 views

VirtualBox installation fails on Ubuntu

I'm trying to install VirtualBox on Ubuntu 22.04. I downloaded the right .deb from the official site and installed with sudo dpkg -i virtualbox-7.0_7.0.12-159484\~Ubuntu\~jammy_amd64.deb which gave ...
0 votes
0 answers
22 views

-bash: ../binutils-2.38/configure: Permission denied

I follow Bare Bones Tutorial on OSDev wiki then I type this: ../binutils-2.38/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror Then I get this ...
0 votes
1 answer
5k views

install C++ compiler (gcc) in SLES (SUSE Linux Enterprise Server)

I need to build a c++ project in SLES (SUSE Linux Enterprise Server) environment. While trying to installing build tools I am facing issue (add repo is failing) in installing c++ (gcc) compiler. ...
1 vote
0 answers
147 views

curlftpfs rw permission denied

i connect my macosx with server ftp with curlftpfs, because i must change one file in every subdir (500), and i do with shell script, but file give permission denied . this my script curlftpfs ftp://...
1 vote
0 answers
624 views

How to setup vscode C++ intellisense to use gcc compiler?

I'm using C++ in vscode with Microsoft C/C++ Extension. I'm using g++ compiler provided in msys2: gcc --version gcc.exe (Rev6, Built by MSYS2 project) 13.1.0 When I write this code in editor, it ...
14 votes
3 answers
64k views

How to install GCC on Windows 7

I've downloaded GCC 4.5.1 and do not know what to do next. I've found instructions inside the Install directory for how to configure, build and install, but I still cannot do much with this. What are ...
3 votes
1 answer
2k views

Ubuntu WSL becomes completely unresponsive

I am trying to use Ubuntu WSL to build the GNU GCC 9.3.0 toolchain, and thought I managed to do do this, but then I couldn't actually use it as a kit in VSCode. I then assumed I did something wrong, ...
0 votes
1 answer
214 views

Building emacs 29 on openSUSE: `configure` cannot find json library despite it being installed

Im currently trying to build emacs 29.0.90 from source. I've installed every version and permutation of json-devel, json-c, libjsoncpp, etc on the repositories, and even built, tested, and installed ...
3 votes
2 answers
3k views

Compile in msys2 mingw64 with -m32 option

Inside a msys2 mingw64 shell, I would like to compile a software with the -m32 option in order to run in 32bit mode. I have installed mingw-w64-x86_64-toolchain But when I compile with -m32, I have ...
-1 votes
1 answer
184 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 ...
0 votes
0 answers
1k views

Static build of nginx with image filter fails

I am trying to build nginx from source with the http_image_filter_module but when I add it I get an error. I run the command below, and it works until I add the --with-http_image_filter_module arg, ...
1 vote
0 answers
695 views

Clang disable Case Sensitive header file inclusion

In Linux when invoking clang compiler with clang++ with Command for the code, main.cpp: #include "Sample.h" int main() { return 0; } include/sample.h # HEADER FILE IMPLEMENTATION ...
1 vote
0 answers
260 views

Linker warnings with new Linux kernel

Thanks for the pointer to the right spot on the mailing list! CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool CHK include/generated/compile.h LD ...
2 votes
2 answers
756 views

Execute C/C++ program in Notepad2

So I have MinGW and with tweaking, I can run GCC in my CMD. What format do I need to have the file in to run it from the CMD? I tried simply just saving a notepad2 file in C scheme and it won't ...
3 votes
1 answer
18k views

How to use GCC compiler in Visual Studio

This seems like it should be easy to do but after a couple hours of Googling I still can't figure out how to use GCC as the compiler for C++ in Visual Studio. I've installed MinGW and the the gcc ...
2 votes
3 answers
7k views

Installing Mingw-w64 without admin rights

How can I install Mingw-w64 without admin rights? Note that I was able to install MinGW without admin rights. I am using Windows 7.
0 votes
1 answer
1k views

'gcc' not recognized though C:\MinGW\bin added to path

I installed mingw from the mingw installer and installed all the basic packages needed. I can run gcc if I give the address of the folder to cmd but not without it. I will attach all the images. The ...
1 vote
2 answers
7k views

CentOS 7 GCC won't compile

I'm running CentOS 7 on a Dell Precision T3400. I have installed the Cacti network monitoring tool and am trying to install Spine, the last critical binary. I've downloaded Spine and am attempting to ...
9 votes
2 answers
15k views

How does gcc find the following header file?

I've included sys/ptrace.h into my C program. The output of /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1 -v gives the following paths where gcc looks for header files #include "..." search starts here: #...
1 vote
0 answers
302 views

Installing Wine 4.20 but winegcc: x86_64-w64-mingw32-gcc failed

I'm trying to install Wine 4.20 for the first time on a new MacBook Pro (16-inch, 2019) running MacOS Monterey (v12.1). I downloaded from winehq, entered ./configure --enable-win64, and then typed ...
0 votes
1 answer
395 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 ...
0 votes
0 answers
337 views

can't build gcc-core-4.1.2 on Ubuntu 20.04.4 LTS

i can't compile gcc-core-4.1.2 on Ubuntu 20.04.4 LTS. 'make bootstrap' fails with $ make bootstrap make[1]: Entering directory '/home/user/Development/gcc-build-root/gcc-core-4.1.2.build/build-x86_64-...
1 vote
0 answers
395 views

gcc --version error prevent installation of Nvidia proprietary driver via DKMS on ubuntu 20.04

When trying to install nvidia proprietary driver on my 20.04 LTS host I ran into a problem that it would not install when using DKMS. It complained about mismatach between gcc version used for the ...
0 votes
1 answer
97 views

Will gcc-git break my current install?

Arch Linux's AUR offers a few versioned packages for GCC, for things that still need an older compiler. But the gcc-git package does not install to opt, or a subdirectory. Since the rest of my system ...
1 vote
3 answers
6k views

How can I install GCC on Mac OS X Lion without Xcode?

I find it really hard to believe there is not a simple solution to install GCC on Mac without having to download and install more than 1 GB+ of Xcode. I found a site that helps reduce the amount ...
0 votes
0 answers
170 views

How can I determine the compiler which processes a header file?

I want to compile a C/C++ project in an Ubuntu environment. My problem is that at some point it encounters a header file where __stdc_version__ is not defined and since both -Werror and -Wundef are ...
3 votes
7 answers
5k views

Install GCC for Mac? 10.5.8

I am trying to install GCC on Mac. I only need the C standard and whatever is required to compile bison. I see a 2.5GB file that will take me all day. I can't start it today so maybe tomorrow. Is ...
0 votes
2 answers
2k views

how to install gcc-7-aarch64-linux-gnu on ubuntu 16.04

With ubuntu 18.04, gcc-7-aarch64-linux-gnu and g++-7-aarch64-linux-gnu can be installed directly via apt but with 16.04 I am unable to find a way in which I can make these packages work. Any pointers ...
0 votes
1 answer
1k views

is it possible to install old version of gcc compiler, even i already have other version's, on CentOS Linux

i installed CentOS6 for some reasons, and want to compile documents written by c++ and fortran. i found i gotta change gcc version due to some errors related by using current gcc-gfortran compiler. ...
0 votes
0 answers
207 views

How to install libcc1.so from cross gcc to target-dependent location?

So I am packaging and installing gcc for an uncommon target. By default all files (excluding docs) have the target name in their full path. But libcc1.so.0.0.0 and symlinks to it are installed at /usr/...
-2 votes
2 answers
3k views

GNU GCC compiler fails to compile when path contains spaces (C++)

I installed code::blocks and GNU GCC + SDK Stream (Open GL) exactly as described in tutorial "Playing with OpenCL: Gaussian Blurring" by Lefteris. Why I cannot compile using spaces in path to library ...
0 votes
2 answers
96 views

Ansible Run Analysis tool :Exception during the install of mysqlclient using pip3

I want to use a mysql engine/database with ARA instead of the default sqlite engine that comes with the tool in order to have a more robust engine for multiple entries but I am facing an issue that ...
0 votes
1 answer
442 views

What are the error messages that are meaningless when you compile gcc with a configure file generared using GNU Autoconf 2.69?

The question is in the title. For example, as explained here gcc unrecognized command line options '-V' and '-qversion' with autoconf, the error message gcc: error: unrecognized ...
1 vote
1 answer
305 views

SASM issues - fedora

I use fedora33 as OS, and I come across an issue when using SASM. Even if I have installed GCC, NASM and FASM, when running the "hello world" samples SASM outputs error messages. Only 32-bit ...
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 ...
0 votes
0 answers
26 views

disconnecting Cygwin commands from Windows CMD

in a system im trying to use gcc installed in c:/mingw/bin, i also set the related PATH variable for that, but running the command gcc -v always shows the cygwin installed gcc because it tells Thread ...
5 votes
3 answers
56k views

checking whether the C compiler works... no

what I am doing wrong? the first error I see in a log is: gcc: error: unrecognized command line option '-V' I have tried to follow some advices from google - but nothing helps.... I have already ...
3 votes
2 answers
15k views

MinGW gcc missing zlib1.dll

Whenever I try to compile a C file using MinGW's gcc, it gives the error that zlib.dll is missing. Is there any reliable way to get zlib.dll or to fix this error?
3 votes
3 answers
7k views

Gentoo LDFLAGS optimizations really needed?

I'm using Gentoo Linux. Here is my toolchain: sys-kernel/linux-headers-3.9 sys-devel/binutils-2.23.1 USE="cxx nls zlib -multislot -multitarget -static-libs {-test} -vanilla" sys-devel/gcc-4.7.3-r1:...
2 votes
2 answers
3k views

Building GCC and Binutils on Windows 7 x64

I am trying to build GCC following the instructions in: Building GCC. At the moment I am building binutils but getting the error: * BFD does not support target x86_64-unknown-cygwin. * Look in ...

1
2 3 4 5 6