Using win32cr - compiler is complaining about missing .lib

require "win32cr"
require "win32cr/src/win32cr/system/systeminformation.cr"

memory_status_ex = Pointer(LibWin32::MEMORYSTATUSEX).malloc

LibWin32.GlobalMemoryStatusEx(memory_status_ex)

p memory_status_ex

Compiling the above code:

crystal.exe build test\memory.cr
Error: Cannot locate the .lib files for the following libraries: windows.media.mediacontrol

I don’t see any relation of the used GlobalMemoryStatusEx function to the missing windows.media.mediacontrol 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.