- Online Community Forums » Installation, Setup & Configuration » Allegro Problem on Xcode 8

This thread is locked; no one can reply to it. rss feed Print
Allegro Problem on Xcode 8
David Jones
Member #16,792
January 2018

I have considerable experience with Allegro on Windows, including teaching a game development class in college using this marvelous library. But for the life of me, I cannot seem to get the configuration right to get even a simple Allegro program to link with Xcode 8. Various other programmers have had the same discrepancy, and I have attempted all of the suggested fixes, to no avail.

I am attempting a simple project as an Xcode Command Line Tool with C++ chosen as the language. After ensuring my main function header is correct and linking with liballegro.5.2.3.dylib and liballegro_main.5.2.3.dylib, I never fail to get an abort during linking with the error:

"dyld: Symbol not found: __al_mangled_main
Referenced from: /usr/local/opt/allegro/lib/liballegro_main.5.2.dylib
Expected in: flat namespace
in /usr/local/opt/allegro/lib/liballegro_main.5.2.dylib"

I have also attempted the fix proposed by SiegeLord in the topic "al_mangled_main() issue OSX while creating a standalone bundle", and that has no effect on the result.

Any suggestions would be very highly appreciated, as I have a considerable set of projects developed over the past ten years in MSVC that I would love to be able to continue work on in the Mac environment. Thanks so much!


There was one provision I did not see in SiegeLord's post: "Make sure not to link allegro_main addon..." After I removed the reference to liballegro_main.5.2.3.dylib in the Build Phases, Link Binary... settings, the program actually ran! (Except for al_clear_to_color not working, but that is only a challenge, not a roadblock.) Hopefully, someone else can learn from my mistake and solution posted here. Thanks for reading!

Go to: