g++: 错误:CreateProcess 没有这样的文件或目录

发布于 2024-12-13 02:48:54 字数 499 浏览 5 评论 0原文

我收到以下错误:

g++: error: CreateProcess no such file or directory

每当我尝试编译程序时。我在 Windows 计算机上安装了 MinGw 7.2 版本,并且没有出现问题,但是在我的家用计算机上安装 Windows SP3 后,我收到此错误,并且我无法弄清楚,因为我已经设置了所有环境变量适当地。我什至尝试将路径设置为 cc1plus.exe 和 cc1.exe 所在的 C:\MinGw\libexec\gcc\i686-mingw32\4.6.1 但仍然没有运气。如果我在命令行:

_assoc.cpp=cpls

_ftype cpls=g++ "%1" %*

_program.cpp

似乎可以编译,因为我收到 C++11 关键字的编译时错误,如果没有 -std=c++0x 开关就无法识别这些错误。有什么建议吗?提前致谢。

I get the following error:

g++: error: CreateProcess no such file or directory

whenever I try to compile a program. I have installed the MinGw 7.2 version at work on a windows machine and the problem does not occur, however after installing Windows SP3 on my home computer I get this error and I just can't figure it out since I have set all the environment variables properly. I even tried setting the path to C:\MinGw\libexec\gcc\i686-mingw32\4.6.1 where cc1plus.exe and cc1.exe are located but still no luck.If i type this at the command line:

_assoc .cpp=cpls

_ftype cpls=g++ "%1" %*

_program.cpp

it seemse to compile since I get compile time errors for the C++11 keywords which aren't recognized without the -std=c++0x switch. Any suggestions? Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神经暖 2024-12-20 02:48:54

我遇到了这个错误,我尝试重新安装 MinGW,更改路径等

最后,删除用户和系统的环境变量中的 GCC_EXEC_PREFIX 环境变量使其工作!
而这也是CMake为什么说C编译器识别未知的根本原因。
就我而言,我认为这是因为 Qt 附带了自己的 MinGW。这也可能是你的原因(即 mingw 已经存在于其他地方)

I had this error and I tried reinstalling MinGW, changing Path, etc

Finally, Removing the GCC_EXEC_PREFIX env variable made from the Environment variable for both User and System made it work!
And this was also the root cause of the reason why CMake said C compiler identification is unknown.
In my case I think it was because Qt ships with its own MinGW. That could be the reason for you too (ie, mingw already exists elsewhere)

∞觅青森が 2024-12-20 02:48:54

您正在编译 32 位二进制文​​件并尝试在 64 位系统上运行它。

为 64 位架构编译二进制文件,它应该可以正常工作:)

http://www.drangon.org/mingw /

You're compiling a 32 bit binary and trying to run it on a 64 bit system.

Compile the binary for the 64 bit architecture and it should work fine :)

http://www.drangon.org/mingw/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文