Cowboy Programming Game Development and General Hacking by the Old West

March 20, 2009

iPhone OpenAL Linking Problem

Filed under: Game Development — Mick West @ 12:23 pm

If you are having linker problems like:
ld warning: in /Library/Frameworks//OpenAL.framework/OpenAL, file is not of required architecture
Undefined symbols:
“_alSourcePlay”, referenced from:
SoundEngineEffect::Start()      in SoundEngine.o
SoundEngineEffect::PlaybackProc(void*)   in SoundEngine.o

Then the problem is that you have an OpenAL framework in /Library/Frameworks and XCode is looking there first.

The simple solution is to delete or rename it.  But that’s not very useful if you need it for something else, or you want you code to compile for other people.   So the correct solution is to change the Framework Search Path.

So, in Project -> Edit Project Settings  select “All Configurations” and “All Settings”, then under Search Paths -> Framework Search Paths,  add:
This will show up in the options as something like iphoneos2.2/System/Library/Frameworks/ (depending on the project setting, and at compile time will automatically switch to the correct framework for the target architecture (simulator or device) and OS version.


  1. The phone has a very smooth UI which is fun to use, but lacks some basic features that might be very important for some. For example, it doesn’t have picture messaging which is very important for some people but not for others.

    Comment by Handmade jewellery — July 31, 2009 @ 9:29 am

  2. we love the iphone

    Comment by iphone — August 5, 2009 @ 7:59 am

  3. One more “how-to” from you, one more “thank you” from me))
    I like reading your posts!

    Comment by Mobile Application Development — September 8, 2009 @ 5:08 am

  4. The iPhone does have many interesting features and applications, but it does lack a few of the more simple ones. I did hear that MMS support is being added later this month though.

    Comment by bowling news — September 8, 2009 @ 9:01 am

  5. Thanks! I was wondering what I messed up when I was getting a similar msg all of a sudden.

    Comment by danny — October 5, 2009 @ 4:54 pm

  6. thanks for the help on that

    Comment by Checking Account — October 23, 2009 @ 9:20 am

  7. So, this is the solution to the linking problem? Anyway, I have not yet encountered a problem like this one. However, I also have problem with OpenAl. My problem lies with the linking related to the audio. What do you think is the remedy?

    Paycheck Advance MS

    Comment by ajay powell — November 1, 2009 @ 9:24 am

  8. There are some weird characters in your post but the message is clear.

    Comment by Tilaa — November 11, 2009 @ 12:19 pm

  9. I had given up on this problem. I tried and tried, but kept failing. Thanks for providing the solution.

    Comment by Second Chance Checking — November 14, 2009 @ 9:05 pm

  10. I was facing this problem before with my new iphone. I taught it was a framework problem. But you have solved my query. Thanks mate. We love our iPhones. :)

    Comment by Facebook Applications — November 19, 2009 @ 5:31 am

  11. Got it. Thanx for the explanation

    Comment by Glass Queens — November 21, 2009 @ 5:25 pm

  12. Good article. I always learn a lot from your posts and really appreciate it! I wish you a Happy New Year. Regards, Martin

    Comment by gebäudeenergieberater — December 28, 2009 @ 9:31 am

  13. Thank you Mick, this is why I couldn’t get my iphone game project to compile for the device.

    Now it’s great!


    Comment by iPhone Games Review — January 7, 2010 @ 12:57 pm

  14. I couldn’t get the sound to work on iphone simulator on SDK2.1

    Comment by Facebook Applications — January 18, 2010 @ 1:14 am

  15. Really great post.
    It is impressive and informative.
    Thanks for share….

    Comment by Shaikh Zafar — February 9, 2011 @ 3:16 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress