Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dev c. failed to execute .exe error 193: %1 not a valid win32 application

Tags:

c++

c

dev-c++

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

like image 358
Christian Chukwu Avatar asked Dec 25 '22 00:12

Christian Chukwu


2 Answers

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 :)

like image 73
Usman Khan Avatar answered Dec 26 '22 13:12

Usman Khan


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

like image 45
Jorge Santos Neill Avatar answered Dec 26 '22 12:12

Jorge Santos Neill