Gcc.exe:CreateProcess:没有这样的文件或目录 - 错误?
我正在编写一个 Objective C 程序,并将其保存为“hello.m”。问题是当我尝试使用 MinGW 编译它时,它给出错误
gcc hello.m // i used for compiling 它给出以下错误
gcc.exe:CreateProcess:没有这样的文件或目录
有什么方法可以修复..以便我可以继续前进..
谢谢
I am writing an Objective C program and i saved it as 'hello.m'. The problem is when i am trying to compile it usig MinGW it is giving an error
gcc hello.m // i used for compiling
and it is giving following error
gcc.exe: CreateProcess : No such File or directory
is there any way to fix ..so that i can move forward..
Thank You
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用此处的 Sysinternals ProcessMonitor。您要做的就是在“进程名称”列下找到正在进行编译的 .exe 名称,例如
gcc.exe
。然后查看“结果”列,将所有不是“成功”的内容都检查出来。我认为您正在寻找的是NAME NOT FOUND
结果。另外,我注意到当我从 shell(例如 msys)运行它时,它没有正确显示。因此,请确保从命令提示符运行 gcc 编译。我遇到了同样的问题,并执行了上面提到的操作,我发现
gcc.exe
得到了cc1obj.exe
的NAME NOT FOUND
结果>。因此,我做了一个有根据的猜测,进入\libexec\gcc\mingw32\4.5.0
下的 MinGW 文件夹(版本号可能与您不同)并复制了cc1.exe
然后将其重命名为cc1obj.exe
。瓦拉,这解决了问题。Use Sysinternals ProcessMonitor from here. What you do is find the .exe name that is doing the compiling under the Process Name column, like
gcc.exe
. Then look in the Result column and anything that is not aSUCCESS
check it out. I think what you are looking for is aNAME NOT FOUND
result though. Also, I noticed that when I ran it from a shell, like msys, it didn't show up properly. So make sure to run the gcc compile from the command prompt.I had this same problem and did what I just mentioned above, I found that
gcc.exe
was getting aNAME NOT FOUND
result forcc1obj.exe
. So I made an educated guess and went into my MinGW folder under\libexec\gcc\mingw32\4.5.0
(the version number might not be the same for you) and made a copy ofcc1.exe
then renamed it ascc1obj.exe
. And wala, that fixed the problem.