JUCE_ALLOW_STATIC_NULL_VARIABLES to disabled not working anymore with JUCE 5.3.2


#1

Sorry if I missed something obvious, but the latest JUCE (5.3.2) on Develop makes the compilation of my projects fail, because of “JUCE_ALLOW_STATIC_NULL_VARIABLES” set to disabled in the Projucer (which, I thought, would be best practice).
The problem comes from Juce internal classes, shown on linking:

juce\modules\juce_core\native/juce_win32_Files.cpp(162): error C2039: 'separator': is not a member of 'juce::File' (compiling source file ..\..\JuceLibraryCode\include_juce_core.cpp)
1>juce\modules\juce_core\files/juce_File.h(41): note: see declaration of 'juce::File' (compiling source file ..\..\JuceLibraryCode\include_juce_core.cpp)
1>juce\modules\juce_core\native/juce_win32_Files.cpp(163): error C2039: 'separatorString': is not a member of 'juce::File' (compiling source file ..\..\JuceLibraryCode\include_juce_core.cpp)
1>juce\modules\juce_core\files/juce_File.h(41): note: see declaration of 'juce::File' (compiling source file ..\..\JuceLibraryCode\include_juce_core.cpp) 

I made sure I don’t use any of these static members… I only tested on Windows.

Setting JUCE_ALLOW_STATIC_NULL_VARIABLES to Enabled corrects the problem.


#2

Ah damn, it passed all our CI tests somehow! Thanks, I’ll push a fix right away…