Open liudonghua123 opened 2 years ago
I found this link https://stackoverflow.com/questions/26065359/m-pi-flagged-as-undeclared-identifier.
So I added the following code to FireBall.cpp:5, then I can build successfully.
#ifdef _WIN32
#include <corecrt_math_defines.h>
#endif
updated: use the following maybe better.
#if defined(_WIN32) || defined(WIN32)
#include <corecrt_math_defines.h>
#endif
I write a simple pr https://github.com/jakowskidev/uMario_Jakowski/pull/20.
I tried to build it on windows according to the readme. But during the build process, I saw the error
D:\code\c_cpp\uMario_Jakowski\uNext\FireBall.cpp(21,20): error C2065: 'M_PI': undeclared identifier [D:\code\c_cpp\uMario_Jakowski\build\uMario.vcxproj]
.logs
```shell D:\code\c_cpp\uMario_Jakowski\build>cmake .. -DCMAKE_TOOLCHAIN_FILE=D:/apps/vcpkg/scripts/buildsystems/vcpk g.cmake -- Building for: Visual Studio 17 2022 CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument