It's been many years since I compiled anything that uses Allegro. I have some code that's a little over a decade old now, and it's dependent on 4.4.2. I have barely touched C/C++ in the past decade, so I'm finding myself a bit rusty on things.
I have Code::Blocks and MinGW setup, but I cannot for the life of me get this code to compile. I get Allegro-related messages, presumably from the linker:
"undefined reference to 'clear_bitmap'"
"undefined reference to 'poll_mouse'"
... etc.
I have the following Linker settings:
E:\allegro-4.4.2-mingw-4.5.2\lib\liballegro-4.4.2-static-md.a
E:\allegro-4.4.2-mingw-4.5.2\lib\libzlib-1.2.5-static-md.a
I have the following Search directories:
[COMPILER]
E:\allegro-4.4.2-mingw-4.5.2\include
E:\alpng13\src
E:\Program Files\CodeBlocks\MinGW\x86_64-w64-mingw32\include
[LINKER]
E:\allegro-4.4.2-mingw-4.5.2\lib
E:\Program Files\CodeBlocks\MinGW\x86_64-w64-mingw32\lib
I can't think of anything else I need to add. Any suggestions?
I haven't used A4 for a looong time, but when linking statically with A5, I set this at the top of my linker settings:
-DALLEGRO_STATICLINK
(In "Other linker settings").
I forgot about that, thanks!
However, it doesn't seem to impact my build at all. I get the very same series of errors.
Damian Grove - I invite you to try my A4.4.3 binaries.
The compiler I used is here :
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z
The binaries for Allegro 4.4.3 and the binaries for Eagle Classic (works with above) are here :
https://bitbucket.org/bugsquasher/unofficial-allegro-5-binaries/downloads/
UPDATE
Here is a full list of the libraries you need to link to when linking statically.
https://www.allegro.cc/files/attachment/613288
-static -lalleggl -ljpgalleg -lloadpng -llogg -lalleg-debug-static -lvorbis -lvorbisenc -lvorbisfile -logg -lpng16 -lzlibstatic -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound
-static-libstdc++
-static-libgcc
-static -lalleggl -ljpgalleg -lloadpng -llogg -lalleg-debug-static -lvorbis -lvorbisenc -lvorbisfile -logg -lpng16 -lzlibstatic -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound -static-libstdc++ -static-libgcc