0

I am trying to code in C++ on Windows 10 (64 bit). I followed this tutorial and installed Cygwin and Netbeans. I have a simple hello world, but it can't compile. Here is the error

CLEAN SUCCESSFUL (total time: 312ms)
cd 'C:\Users\Sam\Documents\NetBeansProjects\CppApplication_1'
C:\Users\Sam\Desktop\Cygwin\bin\make.exe -f nbproject/Makefile-Debug.mk build/Debug/Cygwin-Windows/main.o
mkdir -p build/Debug/Cygwin-Windows
rm -f "build/Debug/Cygwin-Windows/main.o.d"
g++    -c -g -MMD -MP -MF "build/Debug/Cygwin-Windows/main.o.d" -o build/Debug/Cygwin-Windows/main.o main.cpp
In file included from /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/include/c++/cstdlib:72:0,
                 from main.cpp:14:
/usr/include/stdlib.h:16:20: fatal error: stddef.h: No such file or directory
compilation terminated.
make: *** [nbproject/Makefile-Debug.mk:68: build/Debug/Cygwin-Windows/main.o] Error 1

COMPILE FILE FAILED (exit value 2, total time: 3s)

I downloaded Cygwin to a folder on the desktop and the settings appear to be correct in the IDE in tools->options->c/c++->build tools

I just want to be able to write simple programs on Windows and if there's an easier alternative I am open. The Netbeans version is 8.2

northerner
  • 756
  • 5
  • 21
  • Possible duplicate of [Compilation error: "stddef.h: No such file or directory"](http://stackoverflow.com/questions/31600600/compilation-error-stddef-h-no-such-file-or-directory) – Mike Kinghan Apr 19 '17 at 18:16

1 Answers1

0

I would personally ditch cygwin for C++ development on windows and go visit http://www.mingw.org/ for a full port of GCC. It's very easy to install and use.

Netbeans is a pretty good IDE with lots of support and plugins but you also might want to take a look at http://www.codeblocks.org but I'd get the compiler install sorted as a priority.

Jon Scobie
  • 490
  • 4
  • 10