
Issue #20904 has been updated by nobu (Nobuyoshi Nakada). jun66j5 (Jun Omae) wrote in #note-11:
nobu (Nobuyoshi Nakada) wrote in #note-10:
Try `win32/win32.i` instead of `process.i`.
Okay.
Thank you.
If running `.\win32\configure.bat` with `--with-ntver=0x0602`:
``` C:\usr\src\x86\ruby-3.4.0-preview2>findstr "GetSystemTime" win32\win32.i GetSystemTimes( GetSystemTime( GetSystemTimeAsFileTime( GetSystemTimeAdjustment( GetSystemTimeAdjustmentPrecise( GetSystemTimePreciseAsFileTime( timeGetSystemTime( GetSystemTimePreciseAsFileTime(&ft); GetSystemTimePreciseAsFileTime(&ft); GetSystemTimePreciseAsFileTime(&atime); ```
This is the expected result, and it is the default now. It seems I misread and thought that the warning would have been issued even if that option was given. Could you try the latest snapshot (or master branch)? ---------------------------------------- Bug #20904: 3.4.0-preview2: Building miniruby.exe fails for mswin32 https://bugs.ruby-lang.org/issues/20904#change-110930 * Author: jun66j5 (Jun Omae) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED ---------------------------------------- I tried to build 3.4.0-preview2 with MSVC x86, however linking miniruby.exe failed with the following eror: ``` linking miniruby.exe Creating library miniruby.lib and object miniruby.exp win32.obj : error LNK2019: unresolved external symbol _GetSystemTimePreciseAsFileTime referenced in function _clock_gettime miniruby.exe : fatal error LNK1120: 1 unresolved externals ``` It doesn't fail with MSVC x64. Investigating it, Windows 8 is required after #20563 but `NTVER` is still `0x0600` in `win32/Makefile.sub`. I think it should be `0x0602`. Workaround is to invoke `win32\configure.bat` with `--with-ntver=0x0602`. Also, adding temporarily `-w24013` to `WARNFLAGS` in `win32/Makefile.sub`, the following warning is received. ``` compiling win32/win32.c win32.c win32/win32.c(4789): warning C4013: 'GetSystemTimePreciseAsFileTime' undefined; assuming extern returning int ``` -- https://bugs.ruby-lang.org/