Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Browsing all 22009 articles
Browse latest View live
↧

This code snippet is working the first while loop but is not executing the...

This code is supposed to skip a line of file and write everything else in a different file, delete the original one, and rename the different one to the one deleted. Whats wrong with this code is its...

View Article


Clang warning about enum function prototype [closed]

While compiling certain piece of code that uses enum, I see following compiler(clang version 11.0.0, cross aarch64) warning: warning: cannot understand function prototype: 'enum xyz 'It's just normal...

View Article


"No such file or directory" C++ header issue

I'm working on a project that has three cpp files and two header filesAll my files are in the same folder.I've been trying to link the header files with the cpp files for the past few days and I'm...

View Article

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

i try install pcapy, but outgoing notifications like this :cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]pcapdumper.cc:11:18: fatal...

View Article

Why does adding 1 to numeric_limits::min() return 1?

How come subtracting 1 from float max returns a sensible value, but adding 1 to float min returns 1?I thought that if you added or subtracted a value smaller than the epsilon for that particular...

View Article


How to compile for Windows on Linux with gcc/g++?

I have written some effects in C++ (g++) using freeglut on Linux, and I compile them withg++ -Wall -lglut part8.cpp -o part8So I was wondering if it is possible to have g++ make static compiled Windows...

View Article

Libxml2: static or not static

My question is quite simple: Can we compile statically when using the libxml2?Actually, I spent an all day searching how it was possible to do that, but I clearly failed.When I run the following...

View Article

Combining object files to a single file

I have been using -r (relocatable) flag of arm-none-eabi-ld to combine a bunch of object files in a specific folder (using wildcard *.o). It gets one object file as I was expecting but I am having an...

View Article


GCC as compiler in a .vcxproj/.sln file in lieu of MSVC

How do I edit or change the target compiler in a .vcxproj/.sln file to GCC (gcc.exe, g++.exe, ld.exe) installed on Windows in order to compile as perfectly working as MSVC cl.exe building a source code...

View Article


address of register variable in C and C++

I know the concept of register variable and it's use cases but there are few questions in my mind based on what I have tried. I cannot access the address of a register variable in C though I can do it...

View Article

How to build libstdc++-v3 with rtti enabled?

I'm making some small modifications to GCC. In particular, I'm changing the implementation to an allocator in libstdc++-v3/include/ext. To perform the change however, I need to use <typeinfo>, in...

View Article

Why does compiling this code requires very high memory usage and time only in...

Godbolt Link to the codeLogic: Computing a binomial coefficient over a few iterations using a Modular<> struct which is a wrapper over integer supporting modular arithmetic. Combinatorics struct...

View Article

How to prevent GCC from optimizing out a busy wait loop?

I want to write a C code firmware for Atmel AVR microcontrollers. I will compile it using GCC. Also, I want to enable compiler optimizations (-Os or -O2), as I see no reason to not enable them, and...

View Article


Unable to install GCC using anaconda

This is output of the command conda install gcc: Solving environment: failedPackagesNotFoundError: The following packages are not available from current channels: - gcc-6

View Article

Is there any compiler flags to make a default move constructor "empty" the...

Since std::move() is just a cast operation, the default move constructor do not really empty the parameter. This lead to that I have to write all the move constructor by myself, which is boring and...

View Article


Qt/C++ compiler string constant inlining

I am currently in the process of optimizing my program for runtime memory usage. I have a bunch of locations where I am writing to a file and know the filepath already. Thats why I defined the literals...

View Article

ELF File Compiler Stamp

i found this Compiler Stamp in one ELF File: GCC: (Ubuntu 5.3.0-4ubuntu1~1.04.11) 5.4.0 20160622. Could someone tell me what information i can gather? For example the timestamp at the end. What does...

View Article


Why arguments are passed on registers instead of stacks in assembly output?

I am learning assembly language for 86-64. I have learned that arguments are passed using the stacks. However, arguments have been passed using the registers, and one of them, edx is a volatile one. I...

View Article

Failed to build GCC 10 from source

On Oracle Linux, I'm trying to build a GCC toolchain from the following:GCC 10.1.0binutils 2.34GDB 9.2.0All of these are the latest released sources as of today.I've configured like...

View Article

Cannot read from /dev/parport by timeout

Please help with a question.I'm trying to resolve programm example for parport loopback wtire/read.While reading program skip first 6 symbols due to select timeoutand I can't understand what to do in...

View Article
Browsing all 22009 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>