* g++ missing stddef.h
@ 2022-01-19 1:06 slipbits
2022-01-19 5:45 ` Marco Atzeri
0 siblings, 1 reply; 5+ messages in thread
From: slipbits @ 2022-01-19 1:06 UTC (permalink / raw)
To: cygwin
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);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: g++ missing stddef.h
2022-01-19 1:06 g++ missing stddef.h slipbits
@ 2022-01-19 5:45 ` Marco Atzeri
2022-01-19 20:58 ` Kevin Schnitzius
0 siblings, 1 reply; 5+ messages in thread
From: Marco Atzeri @ 2022-01-19 5:45 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: g++ missing stddef.h
2022-01-19 5:45 ` Marco Atzeri
@ 2022-01-19 20:58 ` Kevin Schnitzius
2022-01-20 2:44 ` Marco Atzeri
2022-01-26 17:01 ` Andrey Repin
0 siblings, 2 replies; 5+ messages in thread
From: Kevin Schnitzius @ 2022-01-19 20:58 UTC (permalink / raw)
To: cygwin
On Wednesday, January 19, 2022, 12:46:26 AM EST, Marco Atzeri <marco.atzeri@gmail.com> wrote:>> 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
Works fine from bash. It reproes from cmd.exe
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: g++ missing stddef.h
2022-01-19 20:58 ` Kevin Schnitzius
@ 2022-01-20 2:44 ` Marco Atzeri
2022-01-26 17:01 ` Andrey Repin
1 sibling, 0 replies; 5+ messages in thread
From: Marco Atzeri @ 2022-01-20 2:44 UTC (permalink / raw)
To: cygwin
please use a decent mail program
On 19.01.2022 21:58, Kevin Schnitzius via Cygwin wrote:
> On Wednesday, January 19, 2022, 12:46:26 AM EST, Marco Atzeri <DO NOT FEED SPAMMER> wrote:
>> 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
> Works fine from bash. It reproes from cmd.exe
Than use BASH.
I suspect it is due to PATH and relative location of files by g++
Regards
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: g++ missing stddef.h
2022-01-19 20:58 ` Kevin Schnitzius
2022-01-20 2:44 ` Marco Atzeri
@ 2022-01-26 17:01 ` Andrey Repin
1 sibling, 0 replies; 5+ messages in thread
From: Andrey Repin @ 2022-01-26 17:01 UTC (permalink / raw)
To: Kevin Schnitzius, cygwin
Greetings, Kevin Schnitzius!
> On Wednesday, January 19, 2022, 12:46:26 AM EST, Marco Atzeri
> Works fine from bash. It reproes from cmd.exe
Then your CMD environment is not set identical to your bash env.
Simple fix - use bash.
--
With best regards,
Andrey Repin
Wednesday, January 26, 2022 20:00:24
Sorry for my terrible english...
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-26 17:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19 1:06 g++ missing stddef.h slipbits
2022-01-19 5:45 ` Marco Atzeri
2022-01-19 20:58 ` Kevin Schnitzius
2022-01-20 2:44 ` Marco Atzeri
2022-01-26 17:01 ` Andrey Repin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).