0

Possible Duplicate:
symbol(s) not found for architecture i386

I ger this error:

 Undefined symbols for architecture i386:
  "_AudioServicesPlaySystemSound"
symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1  

And I import #import <AudioToolbox/AudioToolbox.h>.

What can I do about it?

Community
  • 1
  • 1

2 Answers2

2

Importing <AudioToolbox/AudioToolbox.h> is necessary, but not sufficient: you need to add a reference to AudioToolbox.framework to your project in order for your target to link.

In Xcode, open the project, and choose your main target. On the "Summary" page, find "Linked Frameworks and Libraries", and click [+] at the bottom. Select "AudioToolbox.framework", and click [Add]. This should fix the linking error.

Sergey Kalinichenko
  • 714,442
  • 84
  • 1,110
  • 1,523
0

You need to debug the application on a device, simulator don't have iPod or audioplayback. I think....

Kyle Fang
  • 1,139
  • 6
  • 14