Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro 4.2 Mingw msys installation.

This thread is locked; no one can reply to it. rss feed Print
Allegro 4.2 Mingw msys installation.
Tamamo
Member #16,377
June 2016
avatar

I use a MinGW (with gcc version 4.9.3) MSYS environment and am having some trouble building allegro 4.2 from source. Here is what I have done to get things ready for building.

set environment variable MINGDIR=c:\MinGW
added export MINGDIR=/mingw to my 'c:\msys\etc\profile' file.
added allegro to the fstab
then when i launch MSYS and type

#SelectExpand
1cd /allegro 2./fix.sh mingw 3make depend 4make

make returns this

#SelectExpand
1Compiling Allegro for MingGW32, optimised, Please Wait... 2Testing assembler capabilities... 3make init-asmtests 4make[1]: Entering directory `/allegro' 5echo #define ALLEGRO_GENERATED_BY_MAKEFILE_TST > obj\mingw32\asmcapa.h 6 7make[1]: Leaving directory `/allegro' 8make test-mmx 9make[1]: Entering directory `/allegro' 10as --defsym ASMCAPA_MMX_TEST=1 -0 obj/mingw32/asmcapa.o src/misc/asmcapa.s 11echo #define ALLEGRO_MMX >> obj\mingw32\asmcapa.h 12 13make[1]: Leaving directory `/allegro' 14make test-sse 15make[1]: Entering directory `/allegro' 16as -defsym ASMCAPA_SSE_TEST=1 -o obj/mingw32/asmcapa.h src/misc/asmcapa.s 17echo #Define ALLEGRO_SSE >> obj\mingw32\asmcapa.h 18 19make[1]: Leaving directory `/allegro' 20gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -02 -funroll 21-loops -ffast-math -fomit-frame-pointer -I. -I./include obj/mingw32/alleg/poly3d.o -c src/poly3d.c 22src/poly3d.c:32:35: fatal error: obj/mingw32/asmcapa.h: No such file or directory 23 #include ALLEGRO_ASMCAPA_HEADER 24 ^ 25 26compilation terminated. 27make *** [obj.mingw32/alleg/poly3d.o] Error 1

GullRaDriel
Member #3,861
September 2003
avatar

You have to use mingw32-make instead of make, IIRC

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Tamamo
Member #16,377
June 2016
avatar

No dice.

#SelectExpand
1C:\msys\allegro>Compiling Allegro for MinGW32, optimised. Please wait... 2gcc -s -Wl,--subsystem,windows -o tests/win/dibgrab.exe obj/mingw32/alleg/dibgrab.o lib/mingw32/liballeg.a -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound 3obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x135): undefined reference to `save_bitmap' 4obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x1cc): undefined reference to `_imp__default_palette' 5obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x1dc): undefined reference to `set_palette_to_hdc' 6obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x277): undefined reference to `blit_from_hdc' 7obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x2f0): undefined reference to `stretch_blit_to_hdc' 8obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x4c3): undefined reference to `_install_allegro_version_check' 9obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x4d0): undefined reference to `set_gdi_color_format' 10obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x4ec): undefined reference to `create_bitmap_ex' 11obj/mingw32/alleg/dibgrab.o:dibgrab.c:(.text+0x562): undefined reference to `destroy_bitmap' 12collect2.exe: error: ld returned 1 exit status 13make: *** [tests/win/dibgrab.exe] Error 1

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

You used "fix.bat mingw32"?

So dibgrab doesn't build. Did the rest of the library build successfully? The examples?

Those errors indicate it is not linking with Allegro, when it shows that it is right above it (lib/mingw32/liballeg.a). Do you have old versions of allegro installed? Is MINGDIR correct?

Also, do you need to use 4.2 for some reason? DOS perhaps? If you don't, use Allegro 4.4.3 from GIT and build using CMake. It works for me on Windows 10 with MinGW 4.8.1 and CMake 3.3.2.

Go to: