When Building melonDS on Windows, there are the following problems:
1) Msys 64-bit (mingw64 GCC) + CMake:
Build OK, but crashes when execcuting, even if you put the required DLLs on the exe folder.
2) Msis 64-bit (mingw64 GCC) + Code::blocks:
Build gives an error: "src/libui_sdl/main.cpp" M_PI not declared.
Solution:
Looking at "src/libui_sdl/libui/ui.h" (line 31) we can see the following:
// This constant is provided because M_PI is nonstandard.
// This comes from Go's math.Pi, which in turn comes from http://oeis.org/A000796.
So... replacing all "M_PI" for "uiPi" the problem is solved. Both Code::Blocks and CMake build melonDS without errors, and the resulting build runs without crashes.
When Building melonDS on Windows, there are the following problems:
1) Msys 64-bit (mingw64 GCC) + CMake: Build OK, but crashes when execcuting, even if you put the required DLLs on the exe folder. 2) Msis 64-bit (mingw64 GCC) + Code::blocks: Build gives an error: "src/libui_sdl/main.cpp" M_PI not declared.
Solution:
Looking at "src/libui_sdl/libui/ui.h" (line 31) we can see the following:
// This constant is provided because M_PI is nonstandard. // This comes from Go's math.Pi, which in turn comes from http://oeis.org/A000796.
define uiPi 3.14159265358979323846264338327950288419716939937510582097494459
So... replacing all "M_PI" for "uiPi" the problem is solved. Both Code::Blocks and CMake build melonDS without errors, and the resulting build runs without crashes.