-1

I make use of M_PI_2 from math.h in my source code.

This works fine for my Linux, OSX, iOS and Android builds.

When I use the clang compiler for Windows, I get:

use of undeclared identifier 'M_PI_2'

Why is there no M_PI_2 for my clang compiler on Windows? I compile with _POSIX_C_SOURCE=200112L

$ clang --version
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
Bram
  • 7,440
  • 3
  • 52
  • 94

1 Answers1

-1

So, from ucrt/corecrt_math_defines.h I see that:

"Define _USE_MATH_DEFINES before including to expose these macro definitions..."

Bram
  • 7,440
  • 3
  • 52
  • 94