It is currently Mon Sep 23, 2019 6:51 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Linker Error on import C Library
PostPosted: Mon Aug 19, 2019 1:29 am 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 453
Why do I get an Linker error on importing the "AudioUnitGetPropertyInfo()" function?

Code:
ImportC "-framework AudioToolbox"
  AUParameterListenerNotify(inSendingListener.i, *inSendingObject, *inParameter)
  AudioUnitGetPropertyInfo(Audio_Unit.i, inID.l, scope.l, inElement.l, *size, *state)
EndImport

Audio_Unit.i
inID.l
scope.l
inElement.l
size.l
state.i
 AudioUnitGetPropertyInfo(Audio_Unit.i, inID.l, scope.l, inElement.l, @size, @state)


Top
 Profile  
Reply with quote  
 Post subject: Re: Linker Error on import C Library
PostPosted: Tue Aug 20, 2019 12:10 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 453
I got it, I used the wrong frame work.

Code:
ImportC "-framework AudioUnit"
  AudioUnitGetPropertyInfo(Audio_Unit.i, inID.l, scope.l, inElement.l, *size, *state)
EndImport

ImportC "-framework AudioToolbox"
  AUParameterListenerNotify(inSendingListener.i, *inSendingObject, *inParameter)
EndImport

Audio_Unit.i
inID.l
scope.l
inElement.l
size.l
state.i

AudioUnitGetPropertyInfo(Audio_Unit, inID, scope, inElement, @size, @state)


Top
 Profile  
Reply with quote  
 Post subject: Re: Linker Error on import C Library
PostPosted: Tue Aug 20, 2019 1:07 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3443
Location: Netherlands
Wolfram wrote:
I got it, I used the wrong frame work.

Good that you found the solution.

This also seems to work.
Code:
ImportC "-framework AudioUnit -framework AudioToolbox"
  AudioUnitGetPropertyInfo(Audio_Unit.i, inID.l, scope.l, inElement.l, *size, *state)
  AUParameterListenerNotify(inSendingListener.i, *inSendingObject, *inParameter)
EndImport

_________________
macOS 10.14 Mojave, PB 5.62 x64


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye