On Saturday 02 August 2025 19:08:30 LIU Hao wrote: > 在 2025-8-2 03:24, Pali Rohár 写道: > > According to MS documentation all those LZ functions from lzexpand.h header > > file should be linked against the lz32.dll via lz32.lib (liblz32.a in > > mingw): > > https://learn.microsoft.com/en-us/windows/win32/api/lzexpand/nf-lzexpand-lzinit > > > > MS Windows SDK Kernel32.lib import library does not export these symbols. > > > > So comment all duplicate symbols from 32-bit x86 kernel32.def file which are > > present in lz32.def file. > > --- > > mingw-w64-crt/lib32/kernel32.def | 28 ++++++++++++++-------------- > > 1 file changed, 14 insertions(+), 14 deletions(-) > > > Yes they are not provided by kernel32.lib, but by OneCore.lib: > > File: KERNEL32.dll > Format: COFF-import-file-i386 > Type: code > Name type: undecorate > Export name: CopyLZFile > Symbol: __imp__CopyLZFile@8 > Symbol: _CopyLZFile@8
Interesting. I did not checked this one. I saw that functions are available in lz32.def file, MS doc says to use lz32.lib import lib and lz32.dll runtime, and ms toolchain do not have them in kernel32.lib. So I sent this change to remove duplicate symbols from kernel32.def. As the libkernel32.a is automatically linked to every library and executable by gcc, I think that we should avoid duplicate symbols in libkernel32.a and other libraries. Because it does not have to be predicable from which library would be symbol imported into target application. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public