# \#error "No global header file was included!"

**URL:** <https://forum.juce.com/t/error-no-global-header-file-was-included/19843>\
**Category:** General JUCE discussion\
**Created:** [November 8, 2016, 5:12pm UTC](https://forum.juce.com/t/error-no-global-header-file-was-included/19843 "2016-11-08T17:12:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aros](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Aros](https://forum.juce.com/u/Aros)\
**Post date:** [November 8, 2016, 5:12pm UTC](https://forum.juce.com/t/error-no-global-header-file-was-included/19843/1 "2016-11-08T17:12:19Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [November 8, 2016, 8:36pm UTC](https://forum.juce.com/t/error-no-global-header-file-was-included/19843/2 "2016-11-08T20:36:20Z")

</div>

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.

HTH

---

<div class="post-metadata">

**Author:** ![Aros](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Aros](https://forum.juce.com/u/Aros)\
**Post date:** [November 9, 2016, 9:22am UTC](https://forum.juce.com/t/error-no-global-header-file-was-included/19843/3 "2016-11-09T09:22:56Z")

</div>

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 🙂 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…

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [November 9, 2016, 9:30am UTC](https://forum.juce.com/t/error-no-global-header-file-was-included/19843/4 "2016-11-09T09:30:36Z")

</div>

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:

> <https://github.com/WeAreROLI/JUCE/blob/master/modules/JUCE%20Module%20Format.txt>
