bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issues while building ncurses 6.2 using Visual Studio


From: Maarten Anonymous
Subject: Issues while building ncurses 6.2 using Visual Studio
Date: Wed, 26 Feb 2020 00:47:54 +0100

Hello people!

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.

The patches can be found at https://github.com/mirror/ncurses/pull/1
My wip conan script for building ncurses can be found at https://github.com/madebr/conan-center-index/tree/ncurses/recipes/ncurses/all

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]