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

"Variably modified 'variable_name' at file scope" with size defined in macro...

This question already has an answer here:C fixed size array treated as variable size 2 answersI know there is some questions related to this error:thread1, thread2, thread3, thread4,...The difference...

View Article


Cannot find libcrypto library error

When i am trying to compile a C code which uses openssl 'crypto' library functions with comand line -lcrypto with gcc 4.4.3 it gives an error `@ubu:$ gcc -ggdb aes_m.c -Werror -Wall -I...

View Article


Exceptions are not catched in a secondary thread, causing segfault

I cross-compile for a MIPS-based platform. The following code causes segfault, backtrace leads to __cxa_throw:#include <cstdio> #include <exception> #include <thread> #include...

View Article

When try to compile with gcc, "error: error reading" shown on mac terminal

I'm trying to compile my c file created by MacVim with gcc on Mac terminal, but the screen showed like this:r_yeh_mbp_2019@Robinsons-MacBook-Pro ~ % cd Desktop r_yeh_mbp_2019@Robinsons-MacBook-Pro...

View Article

New Warning in gcc 7.4.0 with respect to gcc 5.4.9

Some days ago I updated my UBUNTU distribution from 16.04.12 to 18.04.01.This update caused the transition from gcc-5.4.0 to gcc-7-4-0.In this system I developed an application in c that previously,...

View Article


C Preprocessor Remove Trailing Comma

I have a macro like this:#define C( a... ) ( char *[] ){ a, 0 } This works for non-empty arguments:C( "a", "b" ) => ( char *[] )( "a", "b", 0 } But I want to remove the trailing comma when provided...

View Article

How to boot MINIX 3 through GRUB 0.9x?

I have been trying to install GRUB 0.9x in MINIX 3.2.1, but I have some problems with compiling, because GCC is not longer available for any version of MINIX here.I tried to search information about...

View Article

THEANO_FLAGS error using GCC with Keras Theano on AWS Lambda

I was trying to get Keras (theano) to process my ML model on AWS Lambda. The inference was taking too long (about 60 seconds per image!), so I found a possible solution on the internet: install GCC...

View Article


fatal error: stdio.h: No such file or directory on macOS

I am trying to compile a simple "hello world" program with gcc on macOS and for some reason I get the error "fatal error: stdio.h: No such file or directory"The interesting thing is that, if I compile...

View Article


C - #include and multiple typedefs

I'm writing an embedded C program in eclipse with gcc and can't see how to get around a certain issue. I have a typedef in a header file which is protected by an include guard. Since I use this typedef...

View Article

Exceptions are not caught in a secondary thread, causing segfault

I cross-compile for a MIPS-based platform. The following code causes segfault, backtrace leads to __cxa_throw:#include <cstdio> #include <exception> #include <thread> #include...

View Article

How to set specs file for gcc in Docker container

I'm trying to build TREZOR firmware, it uses docker. Dockerfile contents:RUN apt-get update RUN apt-get install -y build-essential git python python-ecdsa gcc-arm-none-eabi When gcc compiles libopencm3...

View Article

Section `text` will not fit after upgrading `arm-none-eabi-gcc`

I have an open source micromouse robot project. For easier compilation, I use containers (both Podman and Docker should be fine):make image make libopencm3 make This works just fine and generates a...

View Article


gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’

first I install cross-tool, then I build the toolchain, then I want to build the kernel but While compiling kernel 2.6.34 for RAM, repeatedly got the error...

View Article

How to solve this warning: extended initializer lists only available with...

This is my code in c++ below :#include <vector> int main(int argc, char const *argv[]) { std::vector<int> numbers({1,2,3}); return 0; } This is the warning I am getting :warning: extended...

View Article


Embed revision number in executable binary

I want to embed a git revision marker in my binary, but the linker appears to strip it away.Makefile:CPPFLAGS += -DREV=$(shell git describe) file.c:#define xstr(s) str(s) #define str(s) #s const char...

View Article

How do I statically check my templated class at declaration time?

In C# or Java, the following does not compile, because I "forgot" the where part in class declaration, that specifies that T is instance of something that defines the add method.class C<T> { T...

View Article


compiling gcc with -O3 technically increases my cache miss rate

I've been profiling a bit with cachegrind and noticed something. When i compile with -O3 i had fewer data fetches but the same amount of cache misses resulting in a higher miss rate. This is great but...

View Article

How to find variadic macro implementation in file system

I have encounter this macro: __VA_ARGS__ - variadic macro in a document. It is used to expand the triple dots in macro definition (like define SMF(...) fprintf(stdout, __VA_ARGS__), but when I wanted...

View Article

What Type of Kernel am I Coding? [closed]

So I am coding this kernel for my new operating system and I want to code a microkernel but I'm afraid that if I code a monolithic kernel, I might just well be the new Linus Torvalds being unable to...

View Article
Browsing all 21994 articles
Browse latest View live


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