Netbeans的8.1 ​​IDE编译和构建C程序,但不显示它们的输出 [英] Netbeans 8.1 IDE compiles and builds C programs but does not show their output

查看:311
本文介绍了Netbeans的8.1 ​​IDE编译和构建C程序,但不显示它们的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Java SE开发工具包8u66和NetBeans IDE 8.1我的笔记本电脑安装。
目前我正在努力实践的IDE C程序。然而,当我尝试运行任何C程序,我从来没有看到任何输出。
不管我什么C程序,NetBeans IDE中唯一的编译和构建它。它从来没有显示任何输出,当我打'运行项目它使程序运行,直到我关闭IDE。

I have Java SE Development Kit 8u66 and Netbeans IDE 8.1 installed on my laptop. I am currently trying to practise C programs on the IDE. However, when I try to run any C program, I never see any output. No matter what C program I try, the Netbeans IDE only compiles and builds it. It never shows any output and when I hit 'Run Project' it keeps the program running until I close the IDE.

我的问题是我怎么保证我没有得到我每次成功编译一个C程序时失败的输出?
[请注意,发生此问题,而Java SE的开发工具包和NetBeans IDE 8.0.2的早期版本已安装在我的笔记本电脑]

My question is how do I ensure that I get an output without fail each time I compile a C program successfully? [Please note that this issue occurred while an earlier version of the Java SE Development Kit and Netbeans IDE 8.0.2 was installed on my laptop]

我也尝试以下解决方案,但你可以从我的code看到的,它并没有帮助:

I also tried the following solution but as you can see from my code, it didn't help:

请查看错误的附加的图像,以及

Please see the attached image of the error as well

以下是code:

    #include <stdio.h>
    #include <stdlib.h>
       int main(void) {
       printf ("Hello, world!");
       fflush(stdout);
       return (0);
       }

我试图通过进入到我的abc.exe名为.exe文件的完整路径窗户上运行的程序8.1命令提示符。命令提示符从未表现出任何输出[请注意,该方案符合关于NetBeans IDE 8.1]

I tried running the program on the windows 8.1 command prompt by entering the full path to my .exe file named abc.exe. The command prompt never showed any output [Please note that the program was complied on the Netbeans IDE 8.1]

C:\\用户\\ Vishu> CD C:\\结果
     C:> C:\\用户\\ Vishu \\文档\\的NetBeansProjects \\实践\\ abc.exe
  没有输出,光标保持闪烁

c:\Users\Vishu>cd c:\
c:> c:\Users\Vishu\Documents\NetBeansProjects\Practice\abc.exe No output and the cursor kept blinking

我试过其上运行的Cygwin64终端程序,但我有显示,而不是期望的输出误差。首先,我编译源文件,命名为main.c中,成.exe文件ABC的.exe,再后来到xyz.exe。我得到了双方的.exe文件的错误。
请检查以下

I tried running the program on the Cygwin64 Terminal but I got errors displayed instead of the desired output. First, I compiled the source file, named main.c, into .exe files abc .exe and then later into xyz.exe. I got errors on both the .exe files. Please check the following

对于abc.exe文件,我得到了以下错误

For the abc.exe file, I got the following error

Vishu@Sheshadri ~
$ cd C:/Users/Vishu/Documents/NetBeansProjects/Practice

Vishu@Sheshadri /cygdrive/c/Users/Vishu/Documents/NetBeansProjects/Practice
$ notepad main.c

Vishu@Sheshadri /cygdrive/c/Users/Vishu/Documents/NetBeansProjects/Practice
$ gcc -o abc main.c

Vishu@Sheshadri /cygdrive/c/Users/Vishu/Documents/NetBeansProjects/Practice
$ ./abc
  1 [sig] -bash 4928 get_proc_lock: Couldn't acquire sync_proc_subproc       for(5,1), last 7, Win32 error 0
  537 [sig] -bash 4928 proc_subproc: couldn't get proc lock. what 5, val 1

对于xyz.exe文件,我得到了以下错误

For the xyz.exe file, I got the following error

Vishu@Sheshadri ~
$ cd c:/Users/Vishu/Documents/NetBeansProjects/Practice

Vishu@Sheshadri /cygdrive/c/Users/Vishu/Documents/NetBeansProjects/Practice
$ gcc -o xyz main.c

Vishu@Sheshadri /cygdrive/c/Users/Vishu/Documents/NetBeansProjects/Practice
$ ./xyz
2 [sig] -bash 3820 get_proc_lock: Couldn't acquire sync_proc_subproc  for(5,1), last                                                                                                              7, Win32 error 0
463 [sig] -bash 3820 proc_subproc: couldn't get proc lock. what 5, val 1

试图从IDE中的输出时,附在这里的图片显示在IDE日志中的错误/消息。
详情请参阅所附的图像NetBeans IDE的8.1日志中的错误。

The image attached here shows the errors/messages in the IDE log when trying to get an output from the IDE. Please refer the attached image Netbeans IDE 8.1 Log for the error.

推荐答案

由于我先贴上面的问题,我已经卸载在NetBeans IDE 8.1和安装Eclipse IDE的版本:Mars.1版本(4.5.1)。不过,我曾与Eclipse IDE的类似问题也是如此。但是,这是我之前,我的笔记本电脑禁用主动免费的反病毒软件。

Since I first posted the above question, I have uninstalled the Netbeans IDE 8.1 and installed Eclipse IDE Version: Mars.1 Release (4.5.1). However, I had similar issues with the Eclipse IDE as well. But that was until I disabled an active free anti virus software on my laptop.

在我的笔记本电脑的免费杀毒软件被禁用,所有的程序开始变得编译并成功建立。随着现在禁用防病毒,我能够编译,构建和运行的所有程序,可以看到程序的输出为好。

When the free anti virus software on my laptop was disabled, all programs started getting compiled and built successfully. With the anti virus now disabled, I am able to compile, build and run all programs and can see the program output as well.

我已经禁用了检查我的防病毒以下链接:
<一href=\"http://stackoverflow.com/questions/33670472/all-eclipse-c-programs-fail-to-run-hangs-on-launching-delegate\">All Eclipse的C ++程序无法运行,挂起上与QUOT;启动代表和QUOT;

I disabled my anti virus having checked the following link: All Eclipse C++ Programs Fail to Run, Hangs on "Launching Delegate"

在所有的可能性,而使用NetBeans IDE会帮助禁用防病毒。不过,我卸载了IDE之前,我可以找出是否抗病毒与它反正干扰。但是,我认为它是安全的假设,它的确是当杀毒软件被禁用防病毒,因为Eclipse IDE的类似问题与NetBeans IDE的干扰得到了解决。

In all likelihood, disabling the anti virus while using the Netbeans IDE would have helped. However, I uninstalled the IDE before I could find out if the anti virus was interfering with it in anyway. But I think it's safe to assume that it was indeed the anti virus interfering with the Netbeans IDE since similar issues with the Eclipse IDE got resolved when the anti virus software was disabled.

感谢大家谁对解决上述问题作出了贡献。

Thank you to everyone who contributed towards resolving the above mentioned issue.

编辑 - 导致问题的错误是Avast的免费杀毒软件防病毒。
(程序版本:2245年11月1日,病毒定义版本:160107-0,Defintions号:3346214)

Edit - The anti virus that caused the error in question is the Avast Free Antivirus. (Program Version: 11.1.2245, Virus Definitions version: 160107-0, Number of Defintions: 3,346,214)

这篇关于Netbeans的8.1 ​​IDE编译和构建C程序,但不显示它们的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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