Just to double check can you try -lkernel32 (lower case)? I noticed the respective file is spelled lib/libc/mingw/lib-common/kernel32.def.in in the Zig installation.
Also the exported symbols are:
GetCurrentDirectoryA
GetCurrentDirectoryW
I know there is some C preprocessor trickery to make GetCurrentDirectory lower to the A or W version depending on UNICODE but personally I like to explicitly call the W one since it has behavior independent of the system-wide code page setting that the user can arbitrarily modify at any point in time.
Edit: actually the case shouldn’t matter… kernel32 is always linked on that target anyway:
Ah yeah, it was C preprocessor trickery. Maybe I missed it or docs don’t make it clear that GetCurrentDirectory is a macro and I had manually forward declared it instead of including windows.h. I’m too much of a windows noob to remember that lots of functions are macros.
Those link settings should ‘trickle up’ the build process if you’re using sokol-zig as a package.
…specifically for Windows, the sokol headers also have #pragma comment(lib, ...) specifications, but I’m not sure if Zig can pick those up (IIRC Clang does at least for ‘msvc’ targets):