[AD] Allegro 64bit on OS X

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I found the attached uncommited changes in my local sandbox. Without then compiling Allegro in 64 bit mode on OS X does not work: /Users/eglebbk/Program/Allegro5/4.9/src/macosx/main.m: In function ‘- [AllegroAppDelegate updateSystemActivity:]’: /Users/eglebbk/Program/Allegro5/4.9/src/macosx/main.m:129: warning: implicit declaration of function ‘UpdateSystemActivity’ /Users/eglebbk/Program/Allegro5/4.9/src/macosx/main.m:129: error: ‘UsrActivity’ undeclared (first use in this function) /Users/eglebbk/Program/Allegro5/4.9/src/macosx/main.m:129: error: (Each undeclared identifier is reported only once /Users/eglebbk/Program/Allegro5/4.9/src/macosx/main.m:129: error: for each function it appears in.)

whereas 32 bit mode works fine without the same. Apple's documentation indicates that "deprecated features" are not available in 64 bit, but UpdateSystemActivity is not deprecated and the documentation likewise suggests that all that should be required is to #include CoreServices.h or Power.h. However, these do not work for me.

With the attached change, compiling and running Allegro in 64 bit mode works fine (except that I don't have 64 bit versions of Ogg/Vorbis and FLAC installed, which makes those only available in 32 bit). Setting CMAKE_OSX_ARCHITECTURES to "i386; x86_64" will produce "fat binaries" and "fat libraries", as it should.

Part of me is tempted to commit the change, but it looks a bit hackish (it would certainly get a big fat FIXME attached to it) and it shouldn't be necessary. Unless someone else knows how to do this properly (I tried googling for it several weeks back without much success) I'm not sure what else to do in the mean time though...

Evert

Attachment: osx_64bit.diff
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/