dungeons-of-moria/umoria

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

Opened this issue · 1 comments

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.

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.