Skip to main content
Share Your Experience: Take the 2024 Developer Survey
15 votes

Raspbian gcc does not know '.intel_syntax'?

The "assembly" language is architecture-dependent, since its very point is to directly write CPU instructions, and each CPU type has different ones. Your entire program is written in amd64 / Intel ...
grawity_u1686's user avatar
14 votes

How to properly upgrade gcc on Centos 7?

I've confirmed that you can upgrade gcc from the default version 4.8 on centOS 7. First, we need to install "Software Collections" in order to access some of the community packages including ...
nulltron's user avatar
  • 241
7 votes
Accepted

How do I grant access /dev/console to an executable?

You control access to a device the same way you control access to a file: By looking at permission and ownership, and executing the program either as the user that has access permission, or as member ...
dirkt's user avatar
  • 17k
5 votes

gcc unrecognized command line options '-V' and '-qversion' with autoconf

Modern autoconf version 2.69 could be used with the following extended compiler information extraction method: # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: ...
Oleg Kokorin's user avatar
5 votes
Accepted

Upgrade gcc to gcc-4.9 in RHEL 7

Not the year 2000 "redhat 7", but RHEL 7 : Redhat Enterprise Linux 7 Note : devtoolset-3 is not an update of gcc/g++, but just one of the extra compilers available for EL7 . I.e. you can have as many ...
Knud Larsen's user avatar
5 votes

checking whether the C compiler works... no

The crux of the problem is not having a C++ compiler installed. On Debian/Ubnutu systems, it's as simple as installing one: sudo apt install gobjc++
Ben Johnson's user avatar
  • 1,303
4 votes

How to install gcc 5+ on centos

I don't think it's possible to install GCC-5 on CentOS 5, its glibc version (2.5) is way too old. For CentOS 6, use the following instructions: http://en.librehat.com/blog/build-gcc-5-dot-2-on-rhel-...
ostrokach's user avatar
  • 585
4 votes

checking whether the C compiler works... no

I was seeing this while setting up a React Native project. Here is what worked for me. sudo xcode-select --switch /Applications/Xcode.app
Nelu's user avatar
  • 575
4 votes

Detect if command has printed to stderr

gcc didn't consider that as an error You can use the -Werror switch. -Werror Make all warnings into errors. Source Warning Options - Using the GNU Compiler Collection (GCC)
DavidPostill's user avatar
  • 158k
3 votes
Accepted

How do I compile FFMPEG & Libaom without PIE

I updated the guide you followed to include libaom compilation instructions without needing to install another gcc or deal any PIE issues: cd ~/ffmpeg_sources && \ git -C aom pull 2> /dev/...
llogan's user avatar
  • 60k
3 votes
Accepted

Change python 2.7 default gcc 5.4 to gcc 7

That's the version with which python was compiled, not your current gcc version.
arielnmz's user avatar
  • 3,336
3 votes

How do I grant access /dev/console to an executable?

As long as your comfortable with the security implications, you can use the 'setuid' flag to allow users to run your executable as root. First change ownership of the executable to root user and ...
diametralpitch's user avatar
3 votes
Accepted

How to specify MinGW64 for codeblocks 17.02 on Windows 10?

Here I explain the procedure with the ZIP files which does not requires administrator privilege or a setup.exe, just extract those with any decompression tool. This procedure is focused on C/C++. ...
Biswapriyo's user avatar
  • 11.3k
2 votes
Accepted

Cygwin installation stops in make step

https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-passwdinfo in short: mkdir /home/prasanna mkpasswd -c > /etc/passwd sed -i -e "s/Prasanna Rajaram/prasanna/g" /etc/passwd close all ...
matzeri's user avatar
  • 2,458
2 votes

Is it possible to remote compile with gcc?

Distributed compiling can be done with distcc. You can even try crosscompiling with different architectures. Users of gentoo linux compile their whole system from source and you can find lots of ...
Jonas Stein's user avatar
  • 1,122
2 votes
Accepted

How to build gcc-6.x.0 on x64 without "unknown spec" complain?

The problem is likely in some environmental variables of your session. You can try to run the make command in a clean environment: env -i PATH=/bin:/usr/bin make
denis-sumin's user avatar
2 votes

What is a front-end for the GCC Compiler?

A GCC front end turns code into an intermediate, internal form used by GCC. A GCC back end turns this intermediate, internal form into the final form that the compiler outputs. So, for example, if ...
David Schwartz's user avatar
2 votes
Accepted

Install latest GCC on Fedora

GCC 6.3 is latest in the current Fedora 25. If you need a newer, you will need to update to Fedora 26 (currently Beta). How to upgrade your system is described in the following wiki page: https://...
Jakuje's user avatar
  • 10.4k
2 votes
Accepted

How to uninstall a previously installed version of GCC on Windows 10?

I have downloaded tdm64-gcc-5.1.0-2 and want to update but I don't know how to remove the previous version. If you used an installer, TDM-GCC will be listed under Control Panel\Programs\Programs and ...
Anaksunaman's user avatar
  • 17.4k
2 votes
Accepted

Detect if command has printed to stderr

I think @DavidPostill's answer is the correct one, but if you want to retain the distinction between warnings and errors, as well as detecting notes, you can add 2>err to the end of the gcc command:...
AFH's user avatar
  • 17.6k
2 votes

Need to use gcc for computer science I class on C++, having trouble getting started

Installation In addition to gcc, also install g++ . It is the name of the GCC C++ compiler. Text editor Then to start practising C++, open a simple text editor and write a C++ program like this one:...
RalphS's user avatar
  • 131
2 votes

Installing Mingw-w64 without admin rights

You can download the 7z file from : https://sourceforge.net/projects/mingw-w64/files/ If you intend to install the windows version, click the x86_64-posix-seh from MinGW-W64 GCC-8.1.0, and just ...
Chan Luo's user avatar
2 votes
Accepted

Why does my GCC compiler not compile C code?

Traditionally, gcc always names the executable "a.out" unless told otherwise. You should use: gcc -o gcc_test.exe gcc_test.c You can probably also use: make gcc_test
grawity_u1686's user avatar
2 votes
Accepted

Access Denied when compiling c code with gcc

Try it without the -c By @Scott
Harry Kruger's user avatar
2 votes

ldd but for interlibrary dependencies?

As the comment states, just run ldd against the .so you are interested in, e.g.: ldd -v /usr/lib/liblapack.so.3 linux-vdso.so.1 => (0x00007fff93789000) libblas.so.3 => /usr/lib/...
Eradian's user avatar
  • 76
2 votes

ldd but for interlibrary dependencies?

Any tools which work with ELF executables will work identically with ELF shared libraries. In the end, they both use the same dynamic linking mechanism. But if you want a nice overview of direct ...
grawity_u1686's user avatar
2 votes

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

No difference in execution time, the assembly that the compiler generates is the exact same for both. The only reasons why you use one or the another are readability related.
memememe's user avatar
  • 121
2 votes
Accepted

VirtualBox installation fails on Ubuntu

Is there a reason why you prefer to install VirtualBox manually and not using the apt? Install VirtualBox from Ubuntu repositories: sudo apt install virtualbox Install gcc-13 on Ubuntu 22.04: ...
sotirov's user avatar
  • 273
1 vote

How to compile a code with SSE on PowerPC?

Instead of rewriting it to AltiVec another option would be to use something like https://github.com/IvantheDugtrio/veclib to wrap the SSE API and map it into AltiVec.
0x90's user avatar
  • 332

Only top scored, non community-wiki answers of a minimum length are eligible