开发 C. 无法执行 .exe 错误 193:%1 不是有效的 win32 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40188810/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
dev c. failed to execute .exe error 193: %1 not a valid win32 application
提问by Christian Chukwu
so I was trying to test run my dev c++ as usual and it said failed to execute location/name.exe error 193: %1 is not a valid win 32 application. I have not used the compiler for anything complex yet.
所以我试图像往常一样测试运行我的 dev c++,它说无法执行 location/name.exe 错误 193:%1 不是有效的 win 32 应用程序。我还没有将编译器用于任何复杂的事情。
#include<stdio.h>
#include<math.h>
#define PI 3.14
int main()
{
int r = 3;
float area = PI*pow(r,2);
printf("the area of the circle is %f",area);
return 0;
}
I'm using Dev c++ GCC (MinGW) compiler.
我正在使用 Dev c++ GCC (MinGW) 编译器。
it compiles properly but when I try to run, it get this error message
它编译正确,但是当我尝试运行时,它收到此错误消息
Failed to execute "C:\Users\SIM JONES NIGL TD\Desktop\c language\areaofcircle2.exe": Error 193: %1 is not a valid Win32 application.
无法执行“C:\Users\SIM JONES NIGL TD\Desktop\c language\areaofcircle2.exe”:错误 193:%1 不是有效的 Win32 应用程序。
Press any key to continue
按任意键继续
回答by Usman Khan
I just experienced this problem and I noticed that if you just save your programs in a folder containing no spaces. My default folder was set in My documents so I made a folder in my F: Drive named programs and saved the programs in it and then compiled them. I didn't experience this error then :)
我刚刚遇到这个问题,我注意到如果你只是将你的程序保存在一个不包含空格的文件夹中。我的默认文件夹设置在我的文档中,所以我在我的 F: 驱动器中创建了一个名为程序的文件夹,并将程序保存在其中,然后编译它们。我当时没有遇到这个错误:)
回答by Jorge Santos Neill
I solved my problem save the cpp file in a folder with no spaces. For example
我解决了我的问题,将 cpp 文件保存在一个没有空格的文件夹中。例如
Older path c:/Users/jorge santos/programa1.cpp
New path c:/Users/jorgesantos/programa1.cpp
旧路径 c:/Users/jorge santos/programa1.cpp
新路径 c:/Users/jorgesantos/programa1.cpp