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

-E not showing anything extra when using code::blocks and GCC?

I build with code::blocks in Linux no problem, but I need to debug a project includes chain and defines, so I looked up online and said to use -E but adding that to "Other Compiler Options" doesn't...

View Article


undefined reference to `sqlcxt'

Trying to compile some C code (a simple select * from dual with oracle (11g) db connection on Linux, generated from .pc thru proc command) through the gcc command and I always get an error. undefined...

View Article


using gcc __attribute__((__cdecl__)) still results with ld "undefined symbol"

Have an existing .asm source module setup for the standard cdecl naming and calling convention that is built with yasm for an elf32 target. The .asm source can be used across different platforms and...

View Article

Multiple definition of function when compiling object files

I am trying to use a makefile to compile code that's in multiple files into a single executable.I first compile my code into object files placed into a bin directory then I try and compile them...

View Article

Image may be NSFW.
Clik here to view.

Why does my VSCode debugger not stop at breakpoints when debugging C files...

I have configured launch.json and tasks.json in VSCode to compile and debug C files using GCC and GDB on Windows. The code compiles and executes successfully, but the debugger does not stop at the...

View Article


GCC Absolute Location Data Placement & Potential Conflict With ROM

Let's say my device comes with pre-loaded data (4 bytes) in ROM at 0x08016F111. I am trying to preserve and access the data in that address in my application. To do this, I am placing a variable at an...

View Article

‘INT_MAX’ not declared error in 3-rd party projerct [closed]

I'm trying to compile some 3-rd party project ([FreeFT][1]). I've installed all required dependencies but when i issue make game this error error: ‘INT_MAX’ was not declared in this scope occurs for...

View Article

Why gcc can't inline function pointers that can be determined?

The following program compiled under gcc 4.6.2 on centos with -O3:#include <iostream>#include <vector>#include <algorithm>#include <ctime>using namespace std;template...

View Article


Failed to build native gem extensions on Ubuntu 24.04 emulating arm64 with...

I am building a Ruby on Rails project into docker images with GitHub Actions: https://github.com/havenweb/haven/blob/master/.github/workflows/docker-image.ymlThis has worked great for a while, but on...

View Article


Parameter passing for argument when C++17 is enabled changed to match C++14

I have a minimal reproducible example for the issue here.It generates the following note on Linux ARM 64-bit GCC 11.2 compiler.<source>: In function 'void a(Color)':<source>:19:6: note:...

View Article

How can I suppress certain ABI change notes (embedded C++)?

In my project, I am getting many warnings of the form "note: parameter passing for argument of type 'SomeClass<int, float>' when C++17 is enabled changed to match C++14 in GCC 10.1".This occurred...

View Article

Image may be NSFW.
Clik here to view.

Failed to download error while trying to install gcc compiler

I am new to C++ and want to learn it.I tried to follow the instructions here to install the gcc compiler.While typing pacman -S mingw-w64-x86_64-gcc in the MSYS Shell, I get the following error and...

View Article

Why does gcc generate different code for s->a[i] and *(s->a+i)?

I compile this with gcc -O1:#include <stdint.h>struct mystruct{ uint32_t arr[1]; uint32_t something_after_arr;};uint32_t sum1(const struct mystruct *s,uintptr_t n){ uint32_t result=0;...

View Article


Delete dynamically allocated memory twice?

First I'd like to point out that I'm using a GNU GCC compiler. I'm using Code::Blocks as my IDE so I don't have to type in all the compiler junk into the Windows DOS command prompt. If I could be more...

View Article

Why gcc -O0 allocating extra space for local variable (16 instead of 8 bytes)?

I have written simple function in C,void GetInput(){ char buffer[8]; gets(buffer); puts(buffer);}When I disassemble it in gdb's disassembler, it gives following disassembly. 0x08048464 <+0>: push...

View Article


How to compile cmake Werror project with a newer compiler?

I am trying to build an old version of opencv (https://github.com/opencv/opencv/archive/3.4.16.zip). The repo uses -Werror=all or something. On my computer with Ubuntu 22.04 with gcc 11.4, cmake -D...

View Article

How -fomit-frame-pointer gcc option could make debugging impossible?

GCC online doc - 3.10 Options That Control Optimization affirm that -fomit-frame-pointer gcc option can make debbuging impossible.-fomit-frame-pointerDon't keep the frame pointer in a register for...

View Article


Image may be NSFW.
Clik here to view.

Getting a Visual Studio Code launch error while trying to compile/run c++...

I am attempting to get back into C++ programming and I am trying to (and failing) setup for C++ in visual studio code.I followed the documentation per the visual studio documentation and everything...

View Article

Out of memory building Yocto with 32G of RAM

While building boot2qt using bitbake and Yocto, the build fail due to some sort of lack of memory.What is strange is that I have 32G of RAM on this desktop.This issue was diagnosed because of the...

View Article

How to correctly determine at compile time that _Float16 is supported?

I am trying to determine at compile time that _Float16 is supported:#define __STDC_WANT_IEC_60559_TYPES_EXT__#include <float.h>#ifdef FLT16_MAX_Float16 f16;#endifInvocations:# gcc trunk on linux...

View Article
Browsing all 22202 articles
Browse latest View live


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