While packaging ncurses 6.2 for conan, I needed to build it using Visual Studio.
I had to apply some patches to let MSVC build it.
What these patches do not fix is building shared ncurses libraries (dlls) on Windows.
NCURSES_IMPEXP
is defined globally and is the same for every ncurses sublibrary.
Whereas each sublibrary must have its own definition.
What I mean is that when building libmenu, a preprocessor variable LIBMENU_IMPEXP
must be __declspec(dllexport)
but NCURSES_IMPEXP
must be __declspec(dllimport)
.
In these patches, I added code to the autoconf build system to create a mk_shared_lib.sh for visual studio.
I believe this is a bit too lowlevel to add to a build system of a library. It's like reinventing the wheel once again.
I think adding deeper libtool support (using LT_INIT(win32-dll) etc) and don't create these mk_shared_lib.sh scripts, would simplify the build system a lot.
I don't know how supportive the developers are about adding support for modern build systems such as cmake/meson?
It would be nice if (some of) these problems could be adressed upstream.
Best regards
Maarten