On Tue, Aug 26, 2025 at 07:55:22AM +0000, Kirill Makurin wrote:
> Hello,
> 
> Starting with ncurses-6.5-20250816 build fails with the following error:
> 
> ```
> lib_twait.obj : error LNK2019: unresolved external symbol gettimeofday 
> referenced in function _nc_gettime
> .libs\ncurses-6.dll : fatal error LNK1120: 1 unresolved externals
> ```
> 
> Function gettimeofday is not available in CRT.  It is available in mingw-w64,
> which provides its own version of this function.  If applicable, you may
> consider checking for timespec_get, which is available in UCRT[1] (but not
> older CRTs like msvcrt.dll).
> 
> For older CRTs (in particular, when using mingw-w64), you may consider
> checking for clock_gettime, however keep in mind that it is provided by
> winpthreads library, not mingw-w64 runtime (also note that it is declared in
> pthread_time.h, which is included from mingw-w64's time.h).  Since
> winpthreads can also be built and used with MSVC, this check may be useful
> with MSVC as well.  Just keep in mind that this would add a runtime
> dependency on winpthreads library, which may not always be desirable. 
> (perhaps a configure options for this would be OK?)
> 
> There also seems to be an issue introduced in ncurses-6.5-20250809 which does
> not appear in ncurses-6.5-20250816.  I attached three archives, each contains
> config.log, output from `configure` and output from `make` for affected
> versions.  They may not be as useful, but I attached them just in case.

thanks - will see how to fix (agreeing that adding dependencies isn't good)

> Let me know if I can provide any additional information on this issue.

It might help to have some (short?) guide to setting up an environment
to match yours.
 
> - Kirill Makurin
> 
> [1] 
> https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/timespec-get-timespec32-get-timespec64-get1

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

Attachment: signature.asc
Description: PGP signature

Reply via email to