I'm not sure if this is a problem with my programming or something else, which is why it is Programming Questions.
I have a part-finished game that works fine in Linux at home.
I've spent the last three quarters of an hour convincing Dev-C++ that it is in fact compilable (why the hell isn't allegro-config available in Windows?).
Now when I try to run it I get a generic Windows crash message, which I can only assume to be a segfault. It says the program has encountered an error and needs to close. When ran from gdb it claims that there is an error, of number 193. From a bit of Googling I believe this to be a bad executable format.
Does anyone know what I might have done wrong to cause this?
The game uses AllegroGL and Allegro, and is linked with:
-lagl -lalleg -lopengl32 -lglu32 -lgdi32
Which I found from Googling. I am compiling with -g.
EDIT:
GNU gdb 5.2.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-mingw32"... (gdb) run Starting program: E:\programs\Apero/apero Error creating process E:\programs\Apero/apero, (error 193)
EDIT2:
I'm a dumbass.
I should be doing gdb apero.exe, not just gdb apero.
Turns out the stack pointer is being overwritten.