When trying to use Mingw32 to cross-compile my program for Windows,
after having setup all the right directories and libs and everything
I am given this message by make:
Building example 1
ex1.c:4: two or more data types in declaration of RunMain' ex1.c: In function
RunMain’:
ex1.c:4: number of arguments doesn’t match prototype
/usr/win32/include/SDL_mangle.h:54: prototype declaration
make: *** [ex1] Error 1
ex1.c does not declare a RunMain, is SDL_mangle.h clashing with some
Windows specific code or something? This problem doensn’t exist using
GCC to compile it for Linux. I am using the downloaded binary version of
SDL, the new development version.
When trying to use Mingw32 to cross-compile my program for Windows,
after having setup all the right directories and libs and everything
I am given this message by make:
Building example 1
ex1.c:4: two or more data types in declaration of RunMain' ex1.c: In function
RunMain’:
ex1.c:4: number of arguments doesn’t match prototype
/usr/win32/include/SDL_mangle.h:54: prototype declaration
make: *** [ex1] Error 1
ex1.c does not declare a RunMain, is SDL_mangle.h clashing with some
Windows specific code or something? This problem doensn’t exist using
GCC to compile it for Linux. I am using the downloaded binary version of
SDL, the new development version.
Declare your main as:
main(int argc, char *argv[])
not
int main(int argc, char *argv[])
It’s in the new FAQ (or it should be.
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec