开发者

Error in basic C++ program running in Netbeans IDE with Cygwin

I recently started learning C++ and I installed Netbeans IDE 6.9.1 and also the Cygwin compiler packages and configured them, and added Cygwin to my environment variable PATH like the instructions told me to.

I wrote a basic "Hello World" program and when I press Ctrl+F5 to "Debug Main Project" it seems to build fine but the black console/command prompt window flashes then disappears.

Then when I go to Run > Run Main Project, it builds and then a command prompt window pops up with the directory to "sh.exe" in its title.

I took a screenshot of the error message:

Error in basic C++ program running in Netbeans IDE with Cygwin

Does anyone know why this is happening and why I can't get the program to run properly even in debug?

Notice that in the screenshot I switched over to the MinGW tools because I thought maybe Cygwin was the problem, but the same error still occurs.

Any help would be gre开发者_如何学Catly appreciated. Thank you.


"No such file or directory" in the error message is the key. When you run the project, it wants to access a file which is not there. Make sure that the paths are set up correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜