Understanding how the modules are built by project files


#1

I’m having some trouble understanding how juce is being built by Xcode and VisualStudio in the project files generated by the IntroJucer. If you look at an Xcode project generated by IntroJucer for example, under the group Juce Modules the whole source tree of the desired modules are included, but none of them are members of the target. If you look under the group, Juce Library Code, those files are being included in the target but trying to add a module by adding a file to this group doesn’t seem to work. For example the module audio_utils is left out of projects by default by the IntroJucer. So, if you generate a project with the IntroJucer and afterward add juce_audio_utils.mm to the Juce Library Code group, you still get compile errors if you try to use the class MidiKeyboardComponent. You also get compile errors if you include the entire juce_audio_utils directory under the group, Juce Library Code, and this is true whether or not the included files are or are not made target members. I had thought that each one of the files like juce_audio_utils.mm at the base directory of a module was like a mini amalgamation, but this doesn’t seem to be the case…

I really like the idea of the module system in theory and understand the need for them, but so far it’s seemed to make integrating juce into projects where you can’t use the IntroJucer a pain. It would be nice if the IntroJucer had an option for generating juce static library project files for a list of modules. I have some projects with project dependencies to other projects, and these sorts of projects can’t be managed by the Introjucer. But it would be nice if the IntroJucer could just manage a Juce project that could be incorporated into those sorts of projects as a dependency.


#2

I should have posted this in the IntroJucer forum. Sorry…


#3

Yes, that is the case. The module’s main .mm or .cpp file will include all the other cpp files in the module, there’s no magic going on!


#4

Gee, where have we heard this before???