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.
#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.
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.
Press any key to continue
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 :)
I solved my problem save the cpp file in a folder with no spaces. For example
Older path c:/Users/jorge santos/programa1.cpp
New path c:/Users/jorgesantos/programa1.cpp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With