Why no header file included ,but no compile errors

#1

hello everyone , I am a newbie, I have a simple question to ask.

I had read code in “juce_core”, and i found lots of the head file doesn’t include any relative header files, like the “jute_FileSearchPath.h” file, but it use some class that defined in other header files .

but i can succeed build all files. how this implemented ??

0 Likes

#2

Unity builds.
Most of the cpp files aren’t compiled.
Instead a few cpp include lots of cpp files so they’re compiled as one.

1 Like

#3

Yes, that’s the answer. To elaborate:
The files in JuceLibraryCode are auto generated and are actually compiled. But they simply include the files from JUCE\modules.
For easier reference, those files are included in the project as JUCE Modules folder. Like @mtytel said, they are only indirectly compiled by inclusion.
All headers are available in that one include JuceHeader.h

1 Like

#4

got it, thank you

0 Likes