melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.21k stars 533 forks source link

Windows building problem #243

Closed cadaguti closed 3 years ago

cadaguti commented 6 years ago

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.

Arisotura commented 5 years ago

weird, I wouldn't expect M_PI to be completely missing in some configurations

RSDuck commented 3 years ago

Doesn't apply anymore because of the new build system.