free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.77k stars 100 forks source link

Failed compilation on Windows using MSVC compiler #181

Closed davidecatania closed 1 year ago

davidecatania commented 1 year ago

In main.cc, could not compile on Windows, until I replaced constexpr with the macro.

-static const constexpr clap_version m = CLAP_VERSION;
+static const CLAP_CONSTEXPR clap_version m = CLAP_VERSION;

macros.h

#if defined(__cplusplus) && __cplusplus >= 201103L
#   define CLAP_HAS_CXX11
#   define CLAP_CONSTEXPR constexpr
#else
#   define CLAP_CONSTEXPR <--
#endif
abique commented 1 year ago

Hi, Thank you very much for the good catch, and indeed it fixes the compilation issue. Pushed to the next branch. Cheers, Alex