Can build, but can't run C code in netbeans (but it works in command line)

帅比萌擦擦* 提交于 2019-12-22 02:20:27

问题


when I try Building the .exe of my code in C inside NB it makes it successful, but when I try to run it inside the program I always get this error:

Unable to start pty process: 
RUN FAILED (exit value -2, total time: 31ms)

But when I go inside the Run proprieties of the project and set the "Console Type" parameter to "External Terminal" it runs in the command line OK.

Any idea about what it could be? I am working with cygwin.


回答1:


I fixed the problem going to Properties Project -> Run -> Console Type -> External Terminal. In this way you can compile using Netbeans.




回答2:


If you are working on netbeans change to standard output your console, that work for me. Do as follow: Properties Project -> Run -> Console Type ->standard output



来源:https://stackoverflow.com/questions/18049467/can-build-but-cant-run-c-code-in-netbeans-but-it-works-in-command-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!