Was away on holiday last week. Of course I brought my MacBook Pro with me. Unfortunately there's no Internet access, which is extremely painful...
I was playing around with the Core Animation Demo by Bob McCune and created this very simple sound testing project.
Undefined symbols for architecture i386: _OBJC_CLASS_$_AVAudioPlayer referenced from: objc-class-ref
When I finally got Internet today I quickly searched the net and found quite a few people having same issue. I found this post from stackoverflow most relevant. So it's my fault, I didn't add the AVFoundation framework!! Simple as that, but without the Internet I would never be able to work that out for sure as I never seen that error before.
Next question then is how to do that in Xcode 4?
As shown below, click on "TARGETS" in the middle panel, then click on the "Build Phases", expand the "Link Binary With Libraries", then click the "+" sign.
After added the AVFoundation framework it works like a charm!
I love the feeling when I learned new things or fixed some annoying problems!