Closed GiulioRomualdi closed 4 years ago
On windows is still failing with the following error
2020-05-14T10:42:58.3914037Z D:\a\osqp-eigen\osqp-eigen\tests\MPCTest.cpp(75,14): error C2065: 'M_PI': undeclared identifier [D:\a\osqp-eigen\osqp-eigen\build\tests\MPCUnitTests.vcxproj]
even if I added https://github.com/robotology/osqp-eigen/blob/bb6361f5326da52aa0fc972f46432405537bbc6c/tests/MPCTest.cpp#L20-L21
Do you have any hints? @S-Dafarra @traversaro
On windows is still failing with the following error
2020-05-14T10:42:58.3914037Z D:\a\osqp-eigen\osqp-eigen\tests\MPCTest.cpp(75,14): error C2065: 'M_PI': undeclared identifier [D:\a\osqp-eigen\osqp-eigen\build\tests\MPCUnitTests.vcxproj]
even if I added
Do you have any hints? @S-Dafarra @traversaro
Either the math.h
or cmath
header has been transitively included by the headers included before the line that defines _USE_MATH_DEFINES
in that compilation unit. To fix this, either move the definition of _USE_MATH_DEFINES
before any other include, or pass it via command line (i.e. via CMake's target_compile_definitions
).
I guess we do need this :grin: