Using win32cr - compiler is complaining about missing .lib

require "win32cr"
require "win32cr/src/win32cr/system/"

memory_status_ex = Pointer(LibWin32::MEMORYSTATUSEX).malloc


p memory_status_ex

Compiling the above code:

crystal.exe build test\
Error: Cannot locate the .lib files for the following libraries:

I don’t see any relation of the used GlobalMemoryStatusEx function to the missing lib/dll.

Can crystal.exe show the indiviual llvm compiler steps with its arguments ?

You can pass the option --verbose to crystal build to show the linker command it calls.
--cross-compile is another alternative which builds the object file for you and prints the linker command, but you’re supposed to run it yourself.