- Online Community Forums » Allegro Development » Allegro under OS X v10.4

This thread is locked; no one can reply to it. rss feed Print
Allegro under OS X v10.4
Thomas Harte
Member #33
April 2000

As I'm possibly one of the first to be trying out v10.4 and Allegro support for it, I thought it might be appropriate to describe my experiences. I'm just getting going so will return and edit/post further when I've tried more.

First result is that an Allegro program I had built in 10.3.9 runs pretty much as it did. So that's good news!

Second result: an xcode 2.0/gcc 4.0 build of my project derived from the stationary and framework inherited from my 10.3.9 installation and xcode 1.5/gcc 3.3 seems to work also.

Now to try rebuilding Allegro from scratch.

Alas, a bug report!


gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -Wno-long-double -O2 -funroll-loops -ffast-math -fomit-frame-pointer -fno-common -pipe -dynamic -DALLEGRO_USE_C -I. -I./include -o obj/macosx/alleg/gui.o -c src/gui.c
src/gui.c: In function 'update_menu':
src/gui.c:1826: error: invalid storage class for function 'shutdown_single_menu'
make: *** [obj/macosx/alleg/gui.o] Error 1

I'm going to go poke around...

EDIT: I have to admit, I don't understand why the line in question:

static int shutdown_single_menu(MENU_PLAYER *, int *);

exists inside the function update_menu, especially given that its a global function defined elsewhere in the same file. I moved that reference just outside of the function and I get to the following error:


gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -Wno-long-double -O2 -funroll-loops -ffast-math -fomit-frame-pointer -fno-common -pipe -dynamic -DALLEGRO_USE_C -I. -I./include -o obj/macosx/alleg/sound.o -c src/sound.c
src/sound.c:53: error: static declaration of 'digi_none' follows non-static declaration
src/sound.c:28: error: previous declaration of 'digi_none' was here
make: *** [obj/macosx/alleg/sound.o] Error 1

gcc -v is this, by the way:


Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)

EDIT2: my solution to this problem is to remove the static type from the definition on line 53. Thinking a little harder, it might have been smarter to switch the extern for a static on line 28. Whatever - my build continues!

EDIT3: the above two modifications made (my base was 4.2.0 beta 2) and several warnings ignored, everything seems to work. Anecdotally, it seems to go a little faster too. Possibly a horay for gcc 4.0!

Member #794
November 2000

Thanks for testing! :D

About the gcc 4 problems, someone reported a bunch of them last week and Peter has fixed those in CVS, so hopefully they're already fixed for the next beta.

Member #1,336
April 2001

I'll have to keep this in mind (possibly) for when I go about rebuilding Allegro once again. By that time, however, there might already be a fix in place. I've experienced the same results as Thomas in regards to compiling programs using a prior version of Allegro under OS X 10.4. I don't recall what version of Allegro it is. If that's useful, let me know and I'll add it to this post when I get a chance to find out what it is.

"It's nice knowing that someday, the software I write will just be pirated by millions of people." :-/ | Zep's Dreamland | Allegro Newbie Tutorials

Go to: