Build Error on Windows for JUCE 4.2.1 using VS2008


#1

I upgraded to JUCE 4.2.1 and try to build my application on Windows environment (Win7) running VS2008. And I got whole bunch of errors. I was able to build using VS2008 without problem using older version of JUCE.

Then I try to compile JuceDemo just to make sure it is NOT my code that is creating problem. I used Projucer to create new export target VS2008 for JuceDemo. Then build it using VS2008, and I got similar errors. The following errors are listed below.

Any ideas?

==========================================================================
1>------ Rebuild All started: Project: JuceDemo, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project ‘JuceDemo’, configuration 'Debug|Win32’
1>Compiling…
1>juce_video.cpp
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_graphics\native\juce_renderinghelpers.h(248) : error C2039: ‘numeric_limits’ : is not a member of 'std’
1> z:\data\xilicasoftware\juce-git\juce\modules\juce_graphics\native\juce_renderinghelpers.h(246) : while compiling class template member function 'juce::RenderingHelpers::CachedGlyphEdgeTable *juce::RenderingHelpers::GlyphCache<CachedGlyphType,RenderTargetType>::findLeastRecentlyUsedGlyph(void) throw() const’
1> with
1> [
1> RendererType=juce::RenderingHelpers::SoftwareRendererSavedState,
1> CachedGlyphType=juce::RenderingHelpers::CachedGlyphEdgeTablejuce::RenderingHelpers::SoftwareRendererSavedState,
1> RenderTargetType=juce::RenderingHelpers::SoftwareRendererSavedState
1> ]
1> z:\data\xilicasoftware\juce-git\juce\modules\juce_graphics\native\juce_renderinghelpers.h(2481) : see reference to class template instantiation ‘juce::RenderingHelpers::GlyphCache<CachedGlyphType,RenderTargetType>’ being compiled
1> with
1> [
1> CachedGlyphType=juce::RenderingHelpers::CachedGlyphEdgeTablejuce::RenderingHelpers::SoftwareRendererSavedState,
1> RenderTargetType=juce::RenderingHelpers::SoftwareRendererSavedState
1> ]
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_graphics\native\juce_renderinghelpers.h(248) : error C2065: ‘numeric_limits’ : undeclared identifier
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_graphics\native\juce_renderinghelpers.h(248) : error C2062: type ‘int’ unexpected
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_graphics\native\juce_renderinghelpers.h(248) : error C2039: ‘max’ : is not a member of ‘global namespace'' 1>juce_opengl.cpp 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_vector3d.h(73) : error C2039: 'numeric_limits' : is not a member of 'std' 1> z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_vector3d.h(72) : while compiling class template member function 'bool juce::Vector3D<Type>::lengthIsBelowEpsilon(void) throw() const' 1> with 1> [ 1> Type=float 1> ] 1> z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_quaternion.h(92) : see reference to class template instantiation 'juce::Vector3D<Type>' being compiled 1> with 1> [ 1> Type=float 1> ] 1> z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_draggable3dorientation.h(119) : see reference to class template instantiation 'juce::Quaternion<Type>' being compiled 1> with 1> [ 1> Type=float 1> ] 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_vector3d.h(73) : error C2065: 'numeric_limits' : undeclared identifier 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_vector3d.h(73) : error C2275: 'Type' : illegal use of this type as an expression 1> z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_quaternion.h(92) : see declaration of 'Type' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_vector3d.h(73) : error C2039: 'epsilon' : is not a member of 'global namespace’'
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_vector3d.h(73) : error C3861: ‘epsilon’: identifier not found
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_opengl\geometry\juce_vector3d.h(73) : fatal error C1903: unable to recover from previous error(s); stopping compilation
1>juce_gui_extra.cpp
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codedocument.cpp(464) : error C2039: ‘numeric_limits’ : is not a member of 'std’
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codedocument.cpp(464) : error C2065: ‘numeric_limits’ : undeclared identifier
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codedocument.cpp(464) : error C2062: type ‘int’ unexpected
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(975) : error C2039: ‘numeric_limits’ : is not a member of 'std’
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(975) : error C2065: ‘numeric_limits’ : undeclared identifier
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(975) : error C2062: type ‘int’ unexpected
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(975) : error C2039: ‘max’ : is not a member of ‘global namespace'' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(975) : error C2039: 'numeric_limits' : is not a member of 'std' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(975) : error C2039: 'max' : is not a member of 'global namespace’'
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1055) : error C2039: ‘numeric_limits’ : is not a member of 'std’
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1055) : error C2065: ‘numeric_limits’ : undeclared identifier
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1055) : error C2062: type ‘int’ unexpected
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1055) : error C2039: ‘max’ : is not a member of ‘global namespace'' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1056) : error C2039: 'numeric_limits' : is not a member of 'std' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1056) : error C2039: 'max' : is not a member of 'global namespace’'
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1064) : error C2039: ‘numeric_limits’ : is not a member of 'std’
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1064) : error C2065: ‘numeric_limits’ : undeclared identifier
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1064) : error C2062: type ‘int’ unexpected
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1064) : error C2039: ‘max’ : is not a member of ‘global namespace'' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1128) : error C2039: 'numeric_limits' : is not a member of 'std' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1128) : error C2065: 'numeric_limits' : undeclared identifier 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1128) : error C2062: type 'int' unexpected 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1128) : error C2039: 'max' : is not a member of 'global namespace’'
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1129) : error C2039: ‘numeric_limits’ : is not a member of ‘std’
1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\code_editor\juce_codeeditorcomponent.cpp(1129) : error C2039: ‘max’ : is not a member of ‘global namespace'' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\misc\juce_splashscreen.cpp(62) : error C2039: 'numeric_limits' : is not a member of 'std' 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\misc\juce_splashscreen.cpp(62) : error C2065: 'numeric_limits' : undeclared identifier 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\misc\juce_splashscreen.cpp(62) : error C2062: type 'int' unexpected 1>z:\data\xilicasoftware\juce-git\juce\modules\juce_gui_extra\misc\juce_splashscreen.cpp(62) : error C2039: 'max' : is not a member of 'global namespace’’


#2

I have solved this issue by upgrading VS2008 to VS2012. Maybe VS2008 is too old to be supported. You may consider removing the export of this target.


#3

Yeah, we stopped testing for VS2008 a long time ago, it’s ancient in compiler years. We should have a purge of old exporters at some point!


#4

Dear Community,

I’ve solved this issue by adding #include <limits> to juce_StandardHeader.h. I think it should be there for all platforms, somebody please add it it I’m right.

Cheers,
Victor


#5

It’s already in that file… Are you looking at an old version?


#6

Jules,

No, version 4.3.0. In my file it’s inside:

#if JUCE_LINUX
 #include <limits>
#endif

So it’s not compiled.

Cheers,
Victor


#7

I don’t know if it’s made it over to the master branch yet but has been on develop for a long time:


#8

Hi Jules,

File we get with Juce 4.3.0 is different from the one above. Please ask responsible person to promote the changes to the master branch.

And btw thank you for very fast replies and excellent support here!

Cheers,
Victor


#9

Every now and then we merge the develop branch back to master when we feel it has been tested well enough. We’ll probably do this again soon before we release some more features to develop again.