views:

144

answers:

2

my iphone app builds fine in debug configuration, but when i change it to release, i get hundreds of errors, starting with "CoreServices/CoreServices.h: No such file or directory" in AudioFileComponent.h - part of the AudioToolbox framework.

i can't find where in the project/build settings is responsible for this.. thanks for any help.

+1  A: 

I would recommend the following:

  1. Open up your debug target's build settings by right-clicking on the target, hitting "Get Info", and selecting the Build tab.
  2. Select All (Command-A) so the entire contents of the Build setting panel is selected, then copy it to the clipboard.
  3. Paste the contents of the clipboard to an empty text document
  4. Repeat steps 1-3 for the release target of the same project
  5. From there you can use a diff utility or some other method to compare the contents of the two files, which will show you the settings that differ between the two configurations. Some of them will make sense (e.g., optimization settings) whereas others will not. Most likely there is a setting that differs between the two that will resolve your problem.

Another thing you can do is build one of your source files in debug mode, and in the Build Results window copy the contents of the command line to a text editor. Repeat for release mode. Then, replace each space in the command line with a newline (\r). From there you should be able to do a rough side-by-side evaluation of the differences between the two compile instructions, and may be able to figure out what's missing from that.

In general this helps you get a better feel for exactly what XCode is doing under the hood to build your project, which is a good strategy to practice no matter what tool you are using for development.

fbrereto
thanks for the suggestion, that's a good tip to bear in mind in future. i've tried it now and got to a point where all the settings were identical for debug and release, but it still built fine in debug but not release! i tried cleaning first as well.i got it working by removing then adding again all the libraries. no idea why this fixed it but nevermind...
jonydep
A: 

i think the problem was because i had the audiotoolbox package in the wrong place, it wasnt in system/library/frameworks like it should have been. (this doesnt explain why it built ok in debug though)

jonydep