#if JUCE_USE_CDREADER #include "../juce_audio_formats/juce_audio_formats.h" #endif
The problem here is that the amalgamation tool will inline juce_audio_formats.h within the #if directive. Future #includes will be skipped of course (since the tool thinks it was already included).
This creates a compile error where nothing in juce_audio_formats.h is visible if juce_audio_devices.h is included beforehand.
I am working around this in my amalgamation templates by manually including juce_audio_formats.h but it would be nice to have a more permanent solution so this never happens again.