问题
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