dungeons-of-moria / umoria

Moria: a roguelike Dungeon Crawler game | Umoria Source Code
https://umoria.org
GNU General Public License v3.0
337 stars 71 forks source link

LD.exe fails with undefined reference to __imp_* (ncurses library) #80

Open TSBower opened 3 months ago

TSBower commented 3 months ago

Using the MSYS2 environment, with the MINGW64 shell. Install the toolchain and cmake using pacman. Included ncurses library is version 6.4.x. Compilation is uneventful, but linker fails with several dozen "undefined reference to _imp".

One of the headers in the ncurses library has dllexport defined, unless the -DNCURSES_STATIC is explicitly provided as a command line option. I manually added this flag into the CMakeLists.txt file, near the bottom (line 260) in the section where it comments # Make the ncurses library static. Not sure if this is the best place for it.

Recommend: update the project to ensure ncurses library links correctly static, or revise the readme to direct the user to a current environment that works OOtB.

mrcook commented 3 months ago

Thanks @TSBower, unfortunately since I updated to an Arm macbook I no longer have the ability to run Windows. If you'd like to create a PR, I'd be happy to merge it.