java.lang.NullPointer在Netbeans 7.2中运行C++程序时的异常

Lal*_*kaJ 14 c++ netbeans nullpointerexception netbeans-7.2

我想尝试使用C++,并希望使用相同的netbeans IDE,因为我已经将它用于Java开发.我下载了Cygwin工具并相应地设置了IDE.当我尝试运行应用程序时,它表示构建成功...,

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Users/LJee/netbeans/tut-install/CppApplication_1'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/cppapplication_1.exe
make[2]: Entering directory `/cygdrive/c/Users/LJee/netbeans/tut-install/CppApplication_1'
make[2]: `dist/Debug/Cygwin-Windows/cppapplication_1.exe' is up to date.
make[2]: Leaving directory `/cygdrive/c/Users/LJee/netbeans/tut-install/CppApplication_1'
make[1]: Leaving directory `/cygdrive/c/Users/LJee/netbeans/tut-install/CppApplication_1'


BUILD SUCCESSFUL (total time: 450ms)
Run Code Online (Sandbox Code Playgroud)

但该计划将无法运行.它抛出Java Null指针异常.

java.lang.NullPointerException


RUN FAILED (exit value -1, total time: 26ms)
Run Code Online (Sandbox Code Playgroud)

由于C++程序中没有Java代码,因此这必须是IDE的一个问题.我在Netbeans论坛http://forums.netbeans.org/topic52231.html中看到了这个帖子

用户在这里更改了我不想做的IDE版本.

是否有人遇到过这种情况可以帮助我.我会很高兴的!提前致谢!!

Ale*_*lex 27

我在Linux Mint 18 Cinnamon with Netbeans 8.1下遇到了同样的问题,我通过右键单击项目名称项目 - >属性 - >运行 - >控制台类型 - >"标准输出"解决了这个问题

之后,"运行"命令完美无缺.


Lal*_*kaJ 3

我找到了解决方案,您必须将 Cygwin 路径 (C:\cygwin\bin) 添加到环境路径变量中,然后它才能正常工作?查看链接https://netbeans.org/community/releases/72/cpp-setup-instructions.html#compilers