cc1.exe系统错误-缺少libwinpthread-1.dll-但事实并非如此 [英] cc1.exe System Error - libwinpthread-1.dll missing - But it isn't

查看:627
本文介绍了cc1.exe系统错误-缺少libwinpthread-1.dll-但事实并非如此的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从Sourceforge下载了MinGW-w64到我的外部硬盘驱动器上,其中所有文件都位于:

I recently downloaded MinGW-w64 from Sourceforge onto my external hard drive, where all the files reside in:

E:\mingw-w64\x86_64-4.9.2-posix-seh-rt_v3-rev1\mingw64\bin

当我尝试在Windows 8.1上使用gcc编译我的第一个"Hello World"程序时,出现了cc1.exe系统错误,提示我

When I try compiling my first "Hello World" program using gcc on Windows 8.1, I get a cc1.exe System Error, that tells me

该程序无法启动,因为缺少libwinpthread-1.dll. 尝试重新安装该程序以解决问题.

The program can't start because libwinpthread-1.dll is missing. Try reinstalling the program to fix the problem.

但是,libwinpthread-1.dll(所有54,784字节)正坐在与gcc.exe相同的目录中.我真的需要重新安装所有内容,还是这里出现其他问题?

And yet, libwinpthread-1.dll (all 54,784 bytes of it) is sitting right there in the very same directory as gcc.exe. Do I really need to reinstall everything, or is something else going wrong here?

推荐答案

我知道这篇文章已有两年多了,但是最近在使用CMake时遇到了同样的问题.

I know this post is over two years old but I recently had the same problem when using CMake.

我通过将MinGW添加到路径"环境变量中来解决此问题: 我正在使用Windows 10 Home.

I fixed it by adding MinGW to the "Path" Envionment Variable: I am using Windows 10 Home.

  1. "Windows键" +暂停/中断
  2. 左侧是高级系统设置"
  3. 在此窗口的底部,有一个名为环境变量"的按钮
  4. 单击名称路径"
  5. 点击系统变量
  6. 下的编辑"
  7. 在其中添加您的MinGW目录.对我来说是C:\MinGW\bin
  1. "Windows Key"+ Pause/Break
  2. On the left there is "Advanced System settings"
  3. On the bottom of this window there is a button called "Environment Variables"
  4. Click on the name "Path"
  5. Click on "edit" under System Variables
  6. Add your MinGW directory there. For me that was C:\MinGW\bin

我希望我能帮上忙.如果不是你,也许是其他人.

I Hope I could help. If not you, maybe someone else.

这篇关于cc1.exe系统错误-缺少libwinpthread-1.dll-但事实并非如此的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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