Weird compilation error pointing to template acosh in juce_MathFunctions.h


I’m in the process of porting an old application that I worked on a few years back on Windows with the help of JUCE framework.
I’ve managed to get the input signals going to my processing class and everything here works fine.

But now that I’m working on the OSC sending part I’ve this weird issue :

The line referenced by all the errors (line 336 in juce_MathFunctions.h) is the following :
template Type acosh (Type x) { return std::log (x + std::sqrt (x * x - (Type) 1)); }

I’m not using acosh at all in my code. I’ve commented every parts of the .cpp involved by the errors and it doesn’t change a thing.

I’m on windows 10 with Visual Studio 2017 and Juce 5.4.1 build on the 4th of december 2018.

I’m discovering JUCE with this project so my error could definitely come from me missing some important JUCE coing concept.

Thanks for your help !


Please make sure that these are actual errors, and not IntelliSense freaking out for nothing, by changing the drop-down on the right from Build + IntelliSense to Build Only


@McMartin Thanks for your reply !
I’ve just checked, the errors come from the Build not from Intellisense.


Ok so I managed to find what was causing the error but I don’t understand why it causes it.
The error appears when I tried to #inluce "../JuceLibraryCode/JuceHeader.h" in one of the files of my previous folder.
My project looks like this :

The #include of the JUCE headers have been put in the osc/OSCLogListBox.h (which is included in osc/OSCMonitor_EGT.h) and in guitarprocessing/GuitarOSCSend.h (to many files in that folder to show it completely). Of course they are also preset in MainCoponent.h (I’m doing an AudioApp).
The #include in the osc/ subfolder doesn’t trigger the errors listed in the first post, while the one in GuitarOSCSend.h does.

The beginning of GuitarOSCSend.h is like this :

    #pragma once

    #ifndef __CGuitarOSCSend__
    #define __CGuitarOSCSend__

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

    #include <GuitarDefinitions.h> 

The folders guitarprocessing/ and osc/ have been put in the Source/ folder of the project and have been added the same way through the Projucer(drag and drop in the source folder, folder path in the Header Search Path field.

What am I missing ?