|
[A4] undefined reference to `_WinMain'| |
BitCruncher
Member #11,279
August 2009
|
#include <allegro.h> int main() { return 0; } END_OF_MAIN() I'm trying to revive an old project done in A4, but I've been in A5 too long and can't remember why this linker error occurs... Compiler: gcc (tdm64-1) 4.5.2
|
Doctor Cop
Member #16,833
April 2018
|
As of how I remember it, the new versions of Allegro4 doesn't compile on TDM flavor.
|
torhu
Member #2,727
September 2002
|
Hm, is it just _WinMain and not _WinMain@16 or something like that? Or, wait, you are compiling in 64-bit mode? Then it's the _WinMain defined in wsystem.c it can't find. Which doesn't make a lot of sense... Are you sure you are actually linking to Allegro? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I'm guessing you're including the wrong allegro header, for 5 and not for 4, but that would live in allegro5/include. What you wrote should work. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
BitCruncher
Member #11,279
August 2009
|
Just an update. I didn't build allegro, but was just using the pre-built binaries for 4.4.2. Leaving all of the compiler/linker settings the same, I switched to mingw-w64, and it linked the above just fine. As Doctor Cop alluded to, probably something to do with TDM? @torhu,
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
TDM is pretty old. But it should still link allegro just fine, so that's kind of a mystery. EDIT My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
BitCruncher
Member #11,279
August 2009
|
.....that's it. I was trying to link against mingw binaries with tdm...
|
|