繁体   English   中英

C ++无法在Netbeans中编译

[英]C++ not compiling in Netbeans

我正在尝试在Windows 10(64位)上的C ++中进行编码。 我遵循了本教程,并安装了Cygwin和Netbeans。 我有一个简单的hello世界,但无法编译。 这是错误

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)

我将Cygwin下载到桌面上的文件夹中,并且在IDE中的“工具”->“选项”->“ c / c ++”->“构建工具”中显示设置正确

我只希望能够在Windows上编写简单的程序,如果有更简单的选择,我会开放。 Netbeans版本是8.2

我个人会放弃cygwin进行Windows C ++开发,然后访问http://www.mingw.org/获取完整的GCC端口。 它很容易安装和使用。

Netbeans是一个非常不错的IDE,具有很多支持和插件,但是您可能还想看看http://www.codeblocks.org,但我会优先考虑编译器的安装。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM