SiegeLord / DAllegro5

D binding to the Allegro5 game development library
Other
42 stars 15 forks source link

Example fails to run on Mac OS X 10.8.2 #6

Closed ghost closed 11 years ago

ghost commented 11 years ago

The Error message + call stack, when trying to run the example on my Mac:

http://pastie.org/private/4yhpdjscmxo5i44mq9w8bg

I've got Allegro 5.0.7 and dmd 2.060 installed

SiegeLord commented 11 years ago

Ok, try out the current revision of DAllegro. Note the way you use it is now a bit different:

import allegro5.allegro;

void main()
{
    al_run_allegro(
    {
        al_init()
        //your code goes here
        return 0;
    });
}

The example has been changed to do that (so it should work now), but you'll also want to do that in your code.

The reason we need to do that is because OSX has some restrictions of what happens where, so you need this sort of juggling to get it working.

ghost commented 11 years ago

That fixed it, thanks a lot!

SiegeLord commented 11 years ago

Great. I'm not entirely happy with the name of al_run_allegro, so I might change it sometime in the coming days. So when/if you upgrade to the newest git, make sure to glance at the example to see what it is called then.