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

GCC Stack overflow by negative number

I'm getting a very strange error msg. A negative Flash overflow. How is this possibleI'm calling a debug function to print out error msgs on multiple occasions. This error logger function looks like...

View Article


Exec format error 32-bit executable Windows Subsystem for Linux?

When I try to execute a 32-bit file compiled with gcc -m32 main.c -o main on Windows Subsystem for Linux, I get the following error: bash: ./main: cannot execute binary file: Exec format error.If I...

View Article


'linter' package in atom installed with 'linter-gcc' for C linting not...

I am aware that XCode could be part of the issue from this link. I've tried putting the correct path into the linter-gcc settings in atom, adding /bin/gcc-9 at the end of the path, restarting atom...

View Article

GCC constexpr allows add but not bitwise-or with address

Consider this code:#include <cstdint> static int x = 0; const uintptr_t arithmetic() { static constexpr uintptr_t result = ((uintptr_t)&x) + 1u; return result; } const uintptr_t bitwise() {...

View Article

Cmake: ld cannot open map file Unit_Test.map: No such file or directory

I'm working on an embedded C project in Eclipse, cross-compiling to an M4 Cortex target. We are using Cmake (version 3.7.x) to recurse through all of the project files and build them accordingly. We...

View Article


How to enable address sanitizer for multiple C++ binaries

I am working on a product that is composed of multiple C++ executables and libraries that have various dependencies on one another. I am building them all with GCC and -fsanitize-address. From what I...

View Article

error: cuda_runtime.h: No such file or directory

How can I force gcc to look in /usr/cuda/local/include for cuda_runtime.h?I'm attempting to compile a CUDA application with a C wrapper. I'm running Ubuntu 10.04.I've successfully compiled my CUDA...

View Article

Makefile returning error when incorporating other .c files

I've been working on an assignment where we are given a .ssv file that contains bank accounts in the first column and transactions in the second (20 is adding $20 and -20 is taking away $20), and are...

View Article


VSCode including header file in c

I'm trying to work with my header files in c. When i use code blocks, it handles the header include part, but in vs code, i couldn't figure it out yet. this is what i get in vs code. The files are in...

View Article


Picking up value of __attribute__ ((constructor)) function in main

I am trying to create a before-main evaluation like this:int evaluate(int argc, char** argv) __attribute__ ((constructor)); int evaluate(int argc, char** argv) { int result = atoi(argv[1]); if (result...

View Article

LR usage in function return

I am developing an embedded application on an STM32F427. This MCU is using the ARM Cortex M4F core.I am currently working on a debug tool, where it keeps a snapshot of the CPU state during a crash for...

View Article

Function pointers that hold more functions

I am trying to create a function:int func(int a, int b) { if (a == b) return 1; else return 0; } Then I would like to create a function pointer like:int (*ptr)(int, int); How can I assign dynamically...

View Article

C compiler cannot create executables (installing Cocoapods)

While installing RNPermissions and its dependencies I run into an error. Seems to be a problem with my compiler or the package that is being installed.The error: checking whether the C compiler...

View Article


How to enable initialized but not used error in GCC

I'm compiling with a command:gcc grep.c -std=c99 -g -Winit-self -pedantic -w -o main2 && ./main2 lib text.txt and I wish to receive warnings for initialized but not used variables and functions.

View Article

Help on Compiling on AIX

Is there a site where I can find the symbols used in a particular library and its version. For e.g. I m trying to compile some code on AIX using gcc, and it throws me a lot of undefined symbol errors...

View Article


GCC equivalent of PDBs

I have a program that I intend to distribute to end users, and would like to have receive crash reports from them. If I were using MSVC, I would generate minidumps and have those sent to me, and then...

View Article

PATH_MAX undeclared in a cross compiled filesystem

I'm cross / native compiling (Host: x86_64, Target: x86_64) a Linux root file system from scratch using a pre-compiled x86_64 toolchain from toolchains.bootlin.com with the below software.binutils -...

View Article


Can `__has_cpp_attribute` be used as a reliable way to check attribute support?

I stumbled upon a disappointing behavior with GCC 9 regarding [[likely]]/[[unlikely]] attributes support and __has_cpp_attribute.GCC 9 have introduced an experimental support for...

View Article

How to use a newer version of gcc on ubuntu?

I am running ubuntu 18.04 and I currently have:(tensorflow_p36) ubuntu@user:~$ gcc --version gcc (GCC) 4.8.5 (tensorflow_p36) ubuntu@user:~$ gcc-8 --version gcc-8 (Ubuntu 8.3.0-6ubuntu1~18.04.1) 8.3.0...

View Article

When do I need to care about static vs. dynamic linking in C for programs...

All of my programs tend to be rather rudimentary console applications in C. For example, I may write some code to parse a file header and then print some data from the header to the screen. To do this,...

View Article
Browsing all 21994 articles
Browse latest View live


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