简体   繁体   中英

C won't execute

I seem unable to run any C programs. I have tried Visual C, MinGW and 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). Consequently I have no error message to share. I have: restarted my computer and reinstalled MinGW several times with no effect. This seems like it would have to be something on the operating system level given that it is somehow affecting all 3 environments. This problem started following an ill fated attempt to install PCRE in MinGW.

I am running 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.

PS - I have tried a hello world program. 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. For us it turned out that reinstalling the Avast antivirus software fixed the problem. It seems like the Avast got hung up when it tried to scan the newly created exes. It did not give an error or any indication. The exe created by Mingw just hung.

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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