Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » msys2 mingw64 build under windows 7

This thread is locked; no one can reply to it. rss feed Print
msys2 mingw64 build under windows 7
mind78
Member #15,802
November 2014

I followed the guide here: https://wiki.allegro.cc/index.php?title=Building_with_msys2

I also read some threads in here on this forum, but the closest I am coming to succeding in compiling is this:

Mind@Lovelace MINGW64 ~/build_allegro_monolith
$ cmake -G"MSYS Makefiles" -DWANT_MONOLITH=on ../allegro5
-- Guessed MinGW directory: C:/msys/msys64/mingw64
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV - Failed
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H - Failed
S3TC locking disabled. You will not be able to load/save pre-compressed textures with OpenGL.
-- Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
-- Could NOT find OPENSL (missing: OPENSL_INCLUDE_DIR OPENSL_LIBRARY)
-- Could NOT find LATEX (missing: LATEX_COMPILER)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/msys/msys64/home/Mind/build_allegro_monolith

followed by this when make && make install:

[ 67%] Linking CXX executable ex_d3d.exe
CMakeFiles/ex_d3d.dir/objects.a(ex_d3d.cpp.obj): In function `main':
C:/msys/msys64/home/Mind/allegro5/examples/ex_d3d.cpp:59: undefined reference to `D3DXMatrixPerspectiveFovLH'
C:/msys/msys64/home/Mind/allegro5/examples/ex_d3d.cpp:95: undefined reference to `D3DXMatrixTranslation'
C:/msys/msys64/home/Mind/allegro5/examples/ex_d3d.cpp:98: undefined reference to `D3DXMatrixRotationY'
collect2.exe: error: ld returned 1 exit status
examples/CMakeFiles/ex_d3d.dir/build.make:114: receptet för målet ”examples/ex_d3d.exe” misslyckades
make[2]: *** [examples/ex_d3d.exe] Fel 1
CMakeFiles/Makefile2:1689: receptet för målet ”examples/CMakeFiles/ex_d3d.dir/all” misslyckades
make[1]: *** [examples/CMakeFiles/ex_d3d.dir/all] Fel 2
Makefile:127: receptet för målet ”all” misslyckades
make: *** [all] Fel 2

Hmm, for you non swedes, misslyckades = failed
receptet för målet = recipy for the target

Thankful for any advice. Managed to compile this in the past with msys2 but it was like a year ago and I can't remember exactly how I did it back then.

SiegeLord
Member #7,827
October 2006
avatar

Yeah, looks like there was a bug added to the build system. I believe it will only affect that one example, so if you don't need examples, pass -DWANT_EXAMPLES=off to cmake.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

GullRaDriel
Member #3,861
September 2003
avatar

It didn't affected me on the same plateform and compiler.

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

SiegeLord
Member #7,827
October 2006
avatar

Actually yes, I take that back. I made an error with my paths, and after fixing it, it worked again. What changed recently is that the core library no longer links D3DX9, but loads the binary at runtime, so if there's any linking issue, it'll only happen when you build this example.

Check your CMakeCache.txt in the build directory and make sure it has this line in it:

D3DX9_LIBRARY:FILEPATH=F:/msys64/mingw64/x86_64-w64-mingw32/Lib/libd3dx9.a

What I used to compile this is actually this:

export DXSDK_DIR=/mingw64/x86_64-w64-mingw32
cmake .. -G"MSYS Makefiles"
make -j8

I do it that way because I actually have the real DirectX SDK installed, and CMake keeps trying to use it instead of the one shipped with msys...

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

mind78
Member #15,802
November 2014

Thank you for your help, I will try to get it working with these tips :)

Go to: