Thank you for looking into it. I tried building ncurses-6.5-20250621.

I still get errors with clang-cl.exe (btw, cl.exe is OK since it does not care) 
about undeclared functions which are declared in wchar.h from the following 
files:

```
ncurses\base\lib_addch.c
ncurses\base\lib_slkset.c
ncurses\tty\tty_update.c
ncurses\widechar\lib_slk_wset.c
ncurses\widechar\charable.c
ncurses\widechar\lib_unget_wch.c
```

About issue with requirement to explicitly link -luser32, I think I'll suggest 
Automake update their `compile` script to pass some libraries by default just 
like gcc does. This should eventually solve this issue. It also affects some 
other packages.

I think mingw-w64's implementation of tsearch and friends is public domain and 
I think their getopt implementation is under BSD-like or MIT. You could look 
into it. If you're interested, I could take a look and remove mingw-specific 
stuff (e.g. attribute macros) from them so they could compile by themselves.

The libraries, including ncurses++ build successfully with MSVC. The only thing 
is that I cannot really test them since I am not really familiar with curses, I 
was trying to build them as an optional dependency for gettext's libtextstyle.

- Kirill Makurin

________________________________
From: Thomas Dickey
Sent: Saturday, June 21, 2025 10:27 PM
To: [email protected]
Cc: Kirill Makurin
Subject: Re: Building ncurses with MSVC

On Tue, Jun 17, 2025 at 03:54:19AM -0400, Thomas Dickey wrote:
> On Tue, Jun 17, 2025 at 03:19:10AM +0000, Kirill Makurin wrote:
> > Hello,
> >
> > I have recently tried to build ncurses with MSVC-like tools (cl.exe and 
> > clang-cl.exe) and would like to share what I have encountered.
>
> well, yes - if you're attempting to configure on a platform lacking
> the C runtime support, it won't work well.
>
> thanks (will pick through this to improve)

For now, I'll make the suggested fix for $OBJEXT, and make fixes
for headers io.h and wchar.h -- that should let you make progress.

The issue with tsearch may be important - but probably requires some effort.
It appears that my choices are reworking source from FreeBSD, or code
that I wrote long ago using Knuth.

(gnulib isn't a viable choice, due to licensing)

--
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Reply via email to