apm_planner icon indicating copy to clipboard operation
apm_planner copied to clipboard

Win10 build: MSVC2012 redefinition of math constants warning

Open billbonney opened this issue 10 years ago • 0 comments

msvc2012 build has multiple redefinition of math constant warnings

see bug https://bugreports.qt.io/browse/QTBUG-45935 see fix https://codereview.qt-project.org/#/c/111723/

Fix was applying patch below to <qmath.h> and potentially changing all references to math.h (still testing)

#include <QtCore/qglobal.h>

#ifndef _USE_MATH_DEFINES
#  define _USE_MATH_DEFINES
#  define undef_USE_MATH_DEFINES
#endif

#include <math.h>

#ifdef undef_USE_MATH_DEFINES
#  undef _USE_MATH_DEFINES
#  undef undef_USE_MATH_DEFINES
#endif


//#include <QtCore/qcompilerdetection.h> fix https://codereview.qt-project.org/#/c/111723/

billbonney avatar Dec 09 '15 08:12 billbonney