I have this C code:
#include <stdio.h>
int main(void)
{
int courses = 1, groups, students = 54, average_pr_group;
/* The variable groups is uninitialized */
average_pr_group = students / groups;
printf("Groups: %d\n", groups);
printf("There are %d students pr. group in %d course(s)\n", average_pr_group, courses);
return 0;
}
Now i compile this using this command from the shell (cmd):
gcc test.c -o test.exe -lm -Wall
It compiles fine, but when I try to run the generated .exe through Windows Explorer I get this error:
In contrast, I can compile & run this piece of code just fine:
# include <stdio.h>
int main()
{
printf("Hello World");
return 0;
}
I have MinGW installed at C:\MinGW
This is my user PATH variable:
I can run the .exe just fine with msys, is it just built to withstand those kind of errors?