可以构建,但不能在netbeans中运行C代码(但可以在命令行中运行) [英] Can build, but can't run C code in netbeans (but it works in command line)

查看:175
本文介绍了可以构建,但不能在netbeans中运行C代码(但可以在命令行中运行)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在NB内的C中构建我的代码的.exe时,它会成功,但是当我尝试在程序中运行它时,总是会出现此错误:

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.

有什么想法吗?我正在与Cygwin合作.

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

推荐答案

我修复了转到属性项目"->运行"->控制台类型"->外部终端"的问题.这样,您可以使用Netbeans进行编译.

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

这篇关于可以构建,但不能在netbeans中运行C代码(但可以在命令行中运行)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆