Building from the instructions found here: http://curtis.schlak.com/2014/05/22/creating-and-using-allegro-5-static-libraries-with-xcode-5.html
I have cloned from git and checked out the 5.1 branch, cmake seems to be ok but when I go to make, I get the following error:
In file included from /Users/bignic/allegro/src/macosx/hidjoy.m:19:
In file included from /Users/bignic/allegro/include/allegro5/allegro.h:71:
/Users/bignic/allegro/include/allegro5/platform/alosx.h:43:12: fatal error: 'QuickTime/QuickTime.h' file not
found
#import <QuickTime/QuickTime.h>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
There is another post on allegro.cc that seems to resolve the issue but I'm new to macOS, git, and home-brew and don't know how to proceed. The post suggests to use master branch (isn't that the default? 5.1?) or to install --HEAD with homebrew but I have no idea what that means.
If QuickTime APIs are deprecated (?) why are they still included?
Also, is there any way to checkout a version later than 5.1 and might that solve my problem? (5.1 is the latest version that seems to be available to check out?)
You want master, and that's not 5.1. 5.2.4 is the latest branch.
]]>I tried to checkout several but only 5.1 seems to be listed in git?
Any idea what I'm doing wrong?
]]>You're cloning from an old repository.
His instructions say :
git clone git://git.code.sf.net/p/alleg/allegro
You want :
git clone https://github.com/liballeg/allegro5.git git checkout master
]]>
Thanks... getting further, but still some issues.
Freetype seems to not be included, but I've installed it (brew install freetype)
make and make install seem to work fine (freetype is detected and the library is now built)
I am linking all of static libs (as per the page above) but when I build just a basic example, Xcode is throwing an error about architecture:
Undefined symbols for architecture x86_64:
"_FT_Attach_File", referenced from:
_al_load_ttf_font_stretch_f in liballegro_ttf-static.a(ttf.c.o)
...
"_FT_Set_Pixel_Sizes", referenced from:
_al_load_ttf_font_stretch_f in liballegro_ttf-static.a(ttf.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried specifically setting the architecture in cmake to x86_64 and rebuilding allegro, but to no avail.
Other threads and stack overflow seem to indicate I'm just not linking correctly but those other users getting similar errors seem to be using dynamic linking.
]]>It looks like you didn't link to free type or else the symbols are 64-bit.
EDIT
To be more clear, there's an incompatibility between the free type libraries allegro linked to, and the ones you're (not?) linking to.
Hmm... OK. Looks like I still have to link the freetype.6.dylib.
I guess I thought by static linking to the allegro ttf library that I wouldn't have to.
I'm assuming I'll have to redistribute the freetype.6.dylib with the application? If so, is there a suggested location or just in a directory with the app itself?
Thank you kindly for your help!
]]>It depends on which version of FreeType2 allegro was linked to during compile time. Do you have static libs for freetype? I think they might only install or build dynamic versions. You might have to build freetype yourself.
]]>