#error "No global header file was included!"


Hi all,

I have just updated JUCE to the latest version and I get this error from juce_TargetPlatform.h:

#error “No global header file was included!”

Now as the comment to that #error directive says, I have re-saved the the project with the latest Introjucer, but it did not go away.

Can someone explain why is there and what is it for and when is it triggered? Maybe then I will better understand what’s wrong with my code…

I know I have a one header in my code which does not include the header generated by the Introjucer but rather It only includes those modules it needs. Now this is because my file is shared between two projects and thus I cannot just include the generated header because it also contains the binary data. And because both projects use their own binary data, I would get some nasty collisions…

Thanks for the explanation…


If the BinaryData is the only collision, you can untick the setting “Include BinaryData.h in the AppConfig.h file” in the projucer, so you can include the BinaryData.h separately.

The block in the comment you already saw explains other macros you can alternatively set, if you still don’t want to use the global include. Normally just including “../JuceLibraryCode/JuceHeader.h” at the beginning of each *.cpp file usually works best.



OK, thanks. I have defined JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED before including the modules, but I still don’t like this solution. It’s as if I lied about the inclusion :slight_smile: I don’t understand what is this #error good for so that might be a part of the problem. And I would expect something like JUCE_IGNORE_GLOBAL_HEADER macro to bypass this #error rather then lying about the inclusion…


That’s what I think too. Maybe you can start thinking about to put common features and classes in a submodule. The new module format works quite nice: