|
Any tips on Building 64-bit Allegro 5.0.x or 5.1.x on Windows? |
drako0812
Member #11,863
April 2010
|
I was wondering if anyone has successfully built a 64-bit version of Allegro (either 5.0.x or 5.1.x) for Windows (either MSVC or MinGW)? If so, do you have any tips that you could share? I have myself "successfully" built Allegro 5.1.8 using MinGW64, but that was far from a smooth, unbuggy experience. First, I had trouble trying to find an appropriate MinGW64 build. The two I tried were the MinGW-build (aka MinGW64) and MinGW-w64. I succeeded with the former. Second, MinGW/MSYS seemed to like to not put things in the normal places. Third, I wasn't able to use DirectSound because of baffling compilation errors, like MACRO constants that either should have been defined or Allegro using a constant that I couldn't find anywhere (DS3ALG_DEFAULT). Fourth, CMake complained about libjpeg being the incorrect version. And finally, when it did compile it seemed to have problems with memory bitmaps and software rendering. Also, the mandelbrot set example performed horribly slowly. BTW my computer is a notebook running Windows 8 64-bit with a Quad-core AMD A10 @ 2.5 GHz.
|
SiegeLord
Member #7,827
October 2006
|
drako0812 said: And finally, when it did compile it seemed to have problems with memory bitmaps and software rendering. What kind of problems? EDIT: Quote: Third, I wasn't able to use DirectSound because of baffling compilation errors, like MACRO constants that either should have been defined or Allegro using a constant that I couldn't find anywhere (DS3ALG_DEFAULT). You need to use DirectX headers from Microsoft, or the hacked up ones from liballeg.org. The ones that come with mingw-w64 are incomplete in a few spots. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
pkrcel
Member #14,001
February 2012
|
Hey there, I recently built 64 bits versions of Allegro with the Mingw-w64 packages on MYS2. About build problems, I've run into those myself and I ended up NOT USING the Microsoft DirectX headers, instead use the ones provided in the Mingw-w64 distribution (coming from wine project and ReactOS project), I had no further problems with the DX builds. I still have problems if I select the WANT_D3DX9 option when building the D3D example, but since I am interested in OpenGL driver only I simply deselected that. I've run trhough most examples and they run fine, I can't recall any particular slowness actually. About libjpg I suggest going with linking to GDI+, seems to work fine as far as I can tell. About dependencies, did you build them yourself? BTW, I recall using Visualstudio to build Allegro in 64-bit but I don't remember any particolar problem....it was more than 18 months ago thou, so memories are pretty faded... It is unlikely that Google shares your distaste for capitalism. - Derezo |
drako0812
Member #11,863
April 2010
|
@SiegeLord: With memory bitmaps, they usually didn't show up. Also I tried both the Direct SDK (June 2010) and the built-in MinGW64 sdk. I only got the builtin version to work. Thanks for reminding me of the stripped-down DirectX, I'll try that. @pkrcel: Yeah, I didn't realize at the time that using GDI+ would allow me to not need libjpeg. I did build the dependencies in the a5_sourcepack, which also took me forever to get right. With Visual Studio (Visual Studio Express 2013), I just wanted to ask before I tried and failed miserably. I'm assuming nobody has a nice prebuilt 64-bit version of all the dependencies. Hey, I can hope can't I? Anyway, one of the main reasons I wanted to get a working 64-bit MinGW build was so that I could work on a wrapper for Go. There is one that already exists, but I don't exactly care for it. It also hasn't been updated recently, and it doesn't include anything from 5.1.x.
|
pkrcel
Member #14,001
February 2012
|
If you're working with Mingw-w64 crt I'd suggest you work with MSYS2, there you get a working modern MSYS. it includes a port of pacman (the Arch Linux package manager) that makes things "almost" easy: pacman -Sy pacman -S mingw-w64-x86_64-toolchain #installs the 64-bit gcc pacman -S pkg-config #useful! pacman -S mingw-w64-x86_64-freetype #installs freetype (and dependencies) ...[and so forth for the other deps]... this (more or less) should set things up correctly for building allegro (almost! there's still something about freetype..) The advantage about this is that the MingwXX toolchain is not configured as multilib/crosscompiler as is Mingw-builds that you used. I say this because: drako0812 said: Second, MinGW/MSYS seemed to like to not put things in the normal places this is due to Minw-w64 toolchains being originalli multilib, so they do NOT have the usual search paths the original mingw did (e.g. /mingw/lib/ etc... ). This is how I was able to geet my 64-bit build. I still haven't extensively tested it thou. BY THE WAY: there' is also a prebuilt allegro-5.0.10 package both for mingw32 and mingw64: $ pacman -Ss allegro mingw32/mingw-w64-i686-allegro 5.0.10-1 Portable library mainly aimed at video game and multimedia programming (mingw-w64) mingw64/mingw-w64-x86_64-allegro 5.0.10-1 Portable library mainly aimed at video game and multimedia programming (mingw-w64) Hope this helps. It is unlikely that Google shares your distaste for capitalism. - Derezo |
SiegeLord
Member #7,827
October 2006
|
pkrcel said: If you're working with Mingw-w64 crt I'd suggest you work with MSYS2, there you get a working modern MSYS. If you have time, it'd be super-awesome if you wrote up a mingw-w64 + msys2 based guide for compiling A5 on the wiki. This new toolset looks amazing. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
drako0812
Member #11,863
April 2010
|
@SiegeLord: I agree with pkrcel, a guide would be very helpful. Also thanks for mentioning MSYS2, I didn't even realize it existed. Plus, I am generally staying away from package managers for the time being until I can get internet at home. This makes programming, in general, very slow for me. I can only get online when I go into town to McDonald's or somewhere that has free wifi. At home, like now, I have to use my tablet to log on to my neighbor's internet. Anyway, sorry about the rant.
|
pkrcel
Member #14,001
February 2012
|
I was working on putting up a tutorial, but I'm slow It is unlikely that Google shares your distaste for capitalism. - Derezo |
drako0812
Member #11,863
April 2010
|
@pkrcel: Yeah, join the club. Edit: @SiegeLord: I'm currently getting MSYS2 set up Also, I just discovered you're working on a Rust port of Allegro. That's another C/C++ replacement language I was looking into using. Edit 2: Would this also work for building a 64-bit allegro, or should I use the Official DirectX SDK?
|
|