Non-recursive path to local module copy (in Xcode 6.1.1)

I think there may be a bug in the introjucer: when "Copy the module into the project folder" is set on a module in the introjucer, the include paths in Xcode point to ../../JuceLibraryCode/ and ../../JuceLibraryCode/modules, but are set as "non-recursive" (in the xcodeproj).

The module gets copied into a subdirectory in JuceLibraryCode, for example: .../JuceLibraryCode/modules/juce_gui_extra/juce_gui_extra.h.

As a result, when compiling, xcode can't find juce_gui_extra.h

Is this a bug, or am I doing something wrong?

thanks,

nate

(btw I chose this forum over the mac-specific forum, I hope that was correct. thx.)

I tried changing the include path "../../JuceLibraryCode/modules" to be recursive, which solved the problem of the missing header files. But then I get a compile failure:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStackView.h:83:76: Use of undeclared identifier 'FLT_MAX'

which seems to be due to the fact that the file at .../JuceLibraryCode/modules/juce_audio_formats/codecs/flac/libFLAC/include/private/float.h hides the system header file float.h that xcode would normally include from Toolchains/XcodeDefault.xctoolchain/lib/clang/6.0/float.h (I think that's the float.h that xcode would use to define FLT_MAX).

So, changing the include paths to recursive does not seem correct. I wonder if the introjucer should be adding specific include paths for each of the included modules? I suppose I could work around this by adding my own relative include paths for each module included in my jucier file. Am I supposed to do that myself? It seems like something the jucer would automatically do for me, but maybe there's a reason that it doesn't.

ponder ponder...

which seems to be due to the fact that the file at .../JuceLibraryCode/modules/juce_audio_formats/codecs/flac/libFLAC/include/private/float.h hides the system header file

Are you sure...? None of those internal paths are actually added to the project's include path, and the float.h file itself isn't added to the project, so I'm not sure how Xcode would even think of searching there for a header file (?)

Are you sure...? None of those internal paths are actually added to the project's include path, and the float.h file itself isn't added to the project, so I'm not sure how Xcode would even think of searching there for a header file (?)

This problem only happened when I changed the xcode include path to be recursive (by editing the xcode project directly, which I realize would be a bad solution when using the introjucer to create xplat project files). 

The salient question at this point is this:

I wonder if the introjucer should be adding specific include paths for each of the included modules? I suppose I could work around this by adding my own relative include paths for each module included in my jucier file. Am I supposed to do that myself? It seems like something the jucer would automatically do for me, but maybe there's a reason that it doesn't.

 

Ah, sorry, I misunderstood what you meant by making the paths recursive. Yes, doing that is really asking for trouble, especially when you start involving 3rd party libraries, because you never know what filenames are hidden inside the tree.

The introjucer doesn't add paths for the modules because I try to use explicit relative paths when I include things, so that it'll all still work if the project doesn't have the correct header paths. It also avoids any ambiguity between my code and 3rd party code if you want to add your own paths.

The libFLAC is also giving us hard time.

When add here at least for plug-ins I get the FLT_MAX undeclared identifier and also assert is no longer available.
(workaround for assert is to use jassert or encapsulate it somehow).

Workaround for FLT_MAX is to set within the Modules settings:
JUCE_USE_FLAC to Disabled