g++ missing stddef.h

Marco Atzeri marco.atzeri@gmail.com
Wed Jan 19 05:45:35 GMT 2022


On 19.01.2022 02:06, slipbits wrote:
> g++ (GCC) 10.2.0
> Win 7-64
> Netbeans 12.5
> 
> g++ reported a compiler error in not finding stddef.h referenced in 
> stdlib.h. I've looked in /usr/include and /usr/include/c++/v1. I found 
> an stddef.h in /usr/include/c++/v1. Should I copy this to /usr/include?
> 
> The command being executed is 'c:\cygwin64\bin\g++.exe -std=c++11 -g -c 
> NewCFile.cpp -o /dev/null'
> 
> I've checked my cygwin setup download options and have all of gcc 
> modules included for C/C++. This is such an odd error that I feel I'm 
> missing something, and I'm doing something wrong. Can someone help me 
> fix this?
> 
> thanks
> art
> 
> ===== code =====
> 
> #include <stdlib.h>     /* exit, EXIT_FAILURE */
> 
> int main(int argc, char* argv[]) {
>     exit (1);
> }
> 

This works for me from CLI

    g++ -Wall prova.cc -o prova

So how are you setting your NetBeans ?

g++ --version
g++ (GCC) 11.2.0



More information about the Cygwin mailing list