In my unmanaged C++ source i have:
#define _USE_MATH_DEFINES
#include <cmath>
and then I use M_PI a couple of times. Compiling in Debug configuration works flawlessly but in Release it gives:
error C2065: 'M_PI' : undeclared identifier
What could be the configuration property causing this?
Solved.
I had put
#define _USE_MATH_DEFINES
before
#include "stdafx.h"
With Precompiled Headers on (/Yu), as it's in Release mode, everything above it is ignored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With