How to setup Allegro for XCode to be able to automatically build an app bundle
iheartcoffee

I was wondering, how do you add Allegro 5 in to XCode so that you can compile stand alone app bundles for programs written in C?

Edgar Reynaldo

Well, why don't you read the xcode manual? You have to set a search directory for the compile and the linker and link against the libraries used. However you do that in XCode is how you do it in XCode.

Elias

You can also manually build .app bundles, without XCode: https://github.com/liballeg/allegro_wiki/wiki/Creating-macOS-bundles

I don't think there is a guide how to do it with XCode (we're all crazy here and write the code in vim then use the above method) but it should be much simpler, as Edgar said, the main problem will be figuring out which search paths to set to find Allegro libraries and headers.

Peter Hull
Elias said:

we're all crazy here and write the code in vim

N.B. they weren't crazy before they started trying to use vim :P

IMO the easiest way to do it in Xcode is to use the static monolith library. Just make sure the include path and library path are in your project, and then add the library itself. There are two caveats:
1. You need to compile Allegro yourself as (correct me if I'm wrong) homebrew etc. only supply the dynamic lib
2. You need to reference a bunch of system frameworks in the project, which are pulled in automatically if you use dynamic libs.

I can supply more details if you want.

By the way, I would have said the easiest (at least it's the most Mac like) is embeddable frameworks, but the current frameworks that our build system creates are not fit for purpose. Specifically the tools don't seem to be able to code-sign them.

[edit: remembered]

Thread #618328. Printed from Allegro.cc