juce_core/maths/juce_MathsFunctions.h error


#1

My English is really bad, so please don't mind.

I downloaded JUCE from this website and used the tool "Introjucer" to create an consol project using in CodeBlocks(Windows).

I did't add any codes, keeping the source code unchanged, just like the following.


#include "../JuceLibraryCode/JuceHeader.h"

int main (int argc, char* argv[])
{
    // ..your code goes here!

    return 0;
}


And when I tried to compile it with mingw32(latest stable version) under window7 64bit, it was reported as:

"D:\JUCE-WINDOWS\modules\juce_audio_basics\../juce_core/maths/juce_MathsFunctions.h:380:26: error: '_finite' was not declared in this scope"

The related content is: (/juce_core/maths/juce_MathsFunctions.h, 380th line)



/** The isfinite() method seems to vary between platforms, so this is a
    platform-independent function for it.
*/
template <typename NumericType>
inline bool juce_isfinite (NumericType) noexcept
{
    return true; // Integer types are always finite
}
template <>
inline bool juce_isfinite (float value) noexcept
{
   #if JUCE_WINDOWS
    return _finite (value) != 0;
   #else
    return std::isfinite (value);
   #endif
}


So if anyone can help me?


#2

I can't remember what it was exactly, but some issues with MinGW were fixed a while back. You should clone JUCE from the GitHub repository for the latest version of JUCE and see if the problem still persists. The zip file from this site isn't kept up to date with the latest changes.