Building AudioUnits? Don't name any of your own source files "AppConfig.h"!

I’ve just spent the best part of a day trying to work out why I was getting the dreaded rez error 2, and it turns out that naming any of your own files AppConfig.h is very bad idea, as it might work for a while given the right amount of voodoo and/or praying to at least 15 different Hindu Gods, however at some point when the planets are in a certain alignment and/or the requisite number of virgins have not been sacrificed in the last month, XCode will decide that instead of using JUCE’s AppConfig.h it will start using your version, and then you’ll probably get boned by rez!
So, don’t do that!

Yeah, it also causes problems if you try to use JUCE-related code from another JUCE project, because Xcode may decide to use the AppConfig.h from that other project instead of yours, due to the fact they include “…/JuceLibraryCode/AppConfig.h”, and “…/” is interpreted as “relative to this file”. That means any “common” code (used in multiple projects) needs to be kept in a folder where “…/JuceLibraryCode” would not be a valid relative path, allowing the path to be relative to the project, not the file.

1 Like

Strange. Why does two dots get changed to three in my post???

Also, it’s shown as three dots but it’s actually a single character, probably one used to mean “ellipsis”/“etc.”. I suspect some automatic spellchecking/autocomplete changed the two single dots to that when you typed the text.

Put the path in backticks to prevent conversion to ellipsis: ../foo/bar