I have built some juce modules which are compiled with the C compiler. For example, the vf_sqlite module is provided as vf_sqlite.c, to be compiled with the C compiler (since SQLite is written in C).
I would like to be able to include only juce_TargetPlatform.h from within these files so that I can get access to those wonderfully convenient platform macros. The problem is:
namespace JuceDummyNamespace {}
If we could wrap that in “#ifdef __cplusplus” or something it would be great, although in your comment you said you wanted to generate an error if you attempt to build with a C compiler. Maybe we could move the namespace into a separate file:
juce_TargetPlatform.hpp
//...
namespace JuceDummyNamespace {}
#include "juce_TargetPlatform.h"
juce_core.h would include “juce_TargetPlatform.hpp” instead, and I could include “juce_TargetPlatform.h”.
Although I’m unsure if #include <CoreFoundation/CoreFoundation.h> works from a C source file.
