简体   繁体   English

C不会执行

[英]C won't execute

I seem unable to run any C programs. 我似乎无法运行任何C程序。 I have tried Visual C, MinGW and Cygwin. 我尝试过Visual C,MinGW和Cygwin。 When I try to start the program the terminal freezes, this happens for all 3 environments (except for visual studios which does not even get the terminal up). 当我尝试启动程序时,终端冻结,这在所有3种环境下都会发生(除了无法启动终端的Visual Studio)。 Consequently I have no error message to share. 因此,我没有任何错误消息可分享。 I have: restarted my computer and reinstalled MinGW several times with no effect. 我已经:重新启动计算机并重新安装MinGW几次,没有任何效果。 This seems like it would have to be something on the operating system level given that it is somehow affecting all 3 environments. 鉴于它以某种方式影响了所有3个环境,因此似乎必须在操作系统级别上有所作为。 This problem started following an ill fated attempt to install PCRE in MinGW. 在MinGW中错误地尝试安装PCRE之后,开始出现此问题。

I am running Windows 8. 我正在运行Windows 8。

At this point I am on the verge of installing a new OS. 此时,我即将安装新的操作系统。 Does anybody else have an idea? 还有其他人有想法吗? because I am out of them. 因为我不在他们中间。

Note: Please do not suggest new OS's, this is about fixing windows 8. 注意:请不要建议使用新的操作系统,这是关于修复Windows 8的。

PS - I have tried a hello world program. PS-我尝试了一个hello world程序。 The problem is not my code 问题不是我的代码

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv)
{
  printf("hello");
  return (EXIT_SUCCESS);
}

UPDATE: 更新:

I couldn't figure out how to fix this so I reinstalled my OS. 我不知道如何解决此问题,所以我重新安装了操作系统。 Roll your eyes as much as you want, but it's the only thing that worked so consider the issue resolved. 随意滚动眼睛,但这是唯一有效的方法,因此请考虑已解决的问题。

Wow , I had the same problem on a Windows 8.1 PC. 哇,我在Windows 8.1 PC上也遇到了同样的问题。 For us it turned out that reinstalling the Avast antivirus software fixed the problem. 对我们来说,事实证明,重新安装Avast防病毒软件可以解决此问题。 It seems like the Avast got hung up when it tried to scan the newly created exes. Avast尝试扫描新创建的exe时似乎挂断了电话。 It did not give an error or any indication. 它没有给出错误或任何指示。 The exe created by Mingw just hung. Mingw创建的exe文件刚刚挂起。

that is sure a compatibility/platform problem. 那肯定是兼容性/平台问题。 Have a copy of the software you're using for the specific bit(32 or 64), and install it. 拥有特定位(32或64)所用软件的副本,然后安装它。

If still the same problem, download opensource compilers like Borland, etc..If it works, then the IDE has the problem, if not, it's a hardware problem. 如果仍然是同样的问题,请下载开源的编译器(例如Borland等)。如果它可以工作,则IDE有问题,如果没有,则是硬件问题。

抓住另一台计算机B并尝试相同的安装,如果可以运行,则计算机A上存在硬件问题。或者路径问题或A与B之间的其他区别。如果显示相同的问题,则说明您存在安装问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM