Re: LInker errors where there were none before


Graham Cox
 

Thanks,

I have managed to get it working, but the reason is something of a mystery.
Xcode 9 showed the same problem, so that wasn’t it. I created a new project and just added the CCToneGenerator class to it (which is where the calls to Audio Toolbox are made). It compiled, linked and worked fine.

I worked through the build settings for each to see what differed. The only one was deployment target - 10.8 for the failing build, 10.13 for the working one. Changing it to 10.13 compiled, linked and worked fine. The earliest deployment target that works is 10.10. This is the mystery - when I previously built this project it targeted 10.8 and that worked fine. The APIs in question are marked as being available from 10.6.

For this project, targeting 10.10 as a minimum is not a problem, but I can’t understand why it can’t target 10.8 as before.

Any ideas?

—Graham

On 25 Oct 2017, at 12:21 pm, Roland King <rols@...> wrote:

what I usually do to debug these things is pull the link line from the detailed build log, go to the same directory, run it by hand and ensure I see the same result.

Then I start hunting along the command line to ensure the AudioToolbox is really being linked and where it's coming from, then go and check the package to make sure it contains the symbols I need.

You might want (by hand) to also try then shuffling AudioToolbox later in the link line to see if you have a link order issue (CCToneGenerator linked after AudioToolbox). if you can get it going by hand, then go back to Xcode and see what you can do to make it generate a working link line.

Join {cocoa@apple-dev.groups.io to automatically receive all group messages.