02-17-2010, 07:02 PM
#1 (permalink )
Registered Member
Join Date: Jan 2010
Posts: 88
Click Sound
I have tried the method suggested here:
http://www.iphonedevsdk.com/forum/ip...ton-click.html (Post #6)
However, I get an error with the code:
Code:
OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)pathToSound, &theSound);
Giving me the following in terminal: Undefined symbols:
Code:
"_AudioServicesCreateSystemSoundID", referenced from:
-[MainViewController typeNumber:] in MainViewController.o
"_AudioServicesPlaySystemSound", referenced from:
-[MainViewController typeNumber:] in MainViewController.o
The code is in a view controller IBAction. What's wrong?
02-17-2010, 07:03 PM
#2 (permalink )
Ascending Mt. SDK
Join Date: Dec 2009
Posts: 64
Quote:
Originally Posted by
qwertyp
I have tried the method suggested here:
http://www.iphonedevsdk.com/forum/ip...ton-click.html (Post #6)
However, I get an error with the code:
Code:
OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)pathToSound, &theSound);
Giving me the following in terminal: Undefined symbols:
Code:
"_AudioServicesCreateSystemSoundID", referenced from:
-[MainViewController typeNumber:] in MainViewController.o
"_AudioServicesPlaySystemSound", referenced from:
-[MainViewController typeNumber:] in MainViewController.o
The code is in a view controller IBAction. What's wrong?
Did you import the AudioToolKit framework?
02-17-2010, 07:04 PM
#3 (permalink )
Registered Member
Join Date: Jan 2010
Posts: 88
Quote:
Originally Posted by
gbaldwin9
Did you import the AudioToolKit framework?
Code:
#include <AudioToolbox/AudioToolbox.h>
That? Yes, in my .h file.
02-17-2010, 07:14 PM
#4 (permalink )
Registered Member
Join Date: Jun 2009
Posts: 916
You need to also import the framework, the easiest way is go to the frameworks folder in xcode, ctrl click one of the frameworks that already there and choose "reveal in finder". It will show you a folder with all the available frameworks and you can just drag the audiotoolbox in to the frameworks folder in xcode. Make sure to uncheck the box to automatically copy the resources or whatever it says.
02-17-2010, 07:14 PM
#5 (permalink )
Obj-C Learner
Join Date: Apr 2009
Location: Manchester, UK
Posts: 1,030
Quote:
Originally Posted by
qwertyp
Code:
#include <AudioToolbox/AudioToolbox.h>
That? Yes, in my .h file.
But did you import it?
02-17-2010, 07:20 PM
#6 (permalink )
Registered Member
Join Date: Jan 2010
Posts: 88
Quote:
Originally Posted by
lukeca
You need to also import the framework, the easiest way is go to the frameworks folder in xcode, ctrl click one of the frameworks that already there and choose "reveal in finder". It will show you a folder with all the available frameworks and you can just drag the audiotoolbox in to the frameworks folder in xcode. Make sure to uncheck the box to automatically copy the resources or whatever it says.
Added framework, still same error. I also changed the #include to #import, but no luck.
02-18-2010, 04:43 PM
#7 (permalink )
Registered Member
Join Date: Jan 2010
Posts: 88
Bump. Anyone?
11-19-2010, 02:13 AM
#8 (permalink )
Registered Member
Join Date: Nov 2010
Posts: 10
Did you find a solution to your problem ? I am having a similar issue and I would like to know how you sorted this out.
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
» Advertisements
» Online Users: 277
18 members and 259 guests
2WeeksToGo , ADY , apatsufas , dacapo , Dani77 , Fritzer , ghost , HDshot , headkaze , iDifferent , mer10 , mystic.purple , Rudy , smethorst , stoneage , superg , tathaastu , Zool
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,878
Threads: 89,224
Posts: 380,732
Top Poster: BrianSlick (7,129)
Welcome to our newest member, olga2000