when using the mingw/gnu abi if fails to find d3dcompiler lib
when using msvc abi (my prefered option) it fails with the following error error: coff does not support linking multiple objects into one.
am i not doing something correctly or is it a current limitation of zig ?
I am guessing that mingw provides some kind of package config for d3dcompiler that is not available in msvcrt.
A possible fix might be to use the actual dll name in linkSystemLibrary
i.e. "d3dcompiler_47" or whatever the name of the dll actually is.
Note that there is a d3dcompiler.lib so your initial version was correct for msvcrt.
That means that your system is not configured to use the visual studio locations or you did not install the Windows 10(/11) SDK or the dlls are not in your PATH.
Normally zig autodetects the installation. You can verify it using:
❯ zig libc
# The directory that contains `stdlib.h`.
# On POSIX-like systems, include directories be found with: `cc -E -Wp,-v -xc /dev/null`
include_dir=C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt
# The system-specific include directory. May be the same as `include_dir`.
# On Windows it's the directory that includes `vcruntime.h`.
# On POSIX it's the directory that includes `sys/errno.h`.
sys_include_dir=C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.51.36231\include
# The directory that contains `crt1.o` or `crt2.o`.
# On POSIX, can be found with `cc -print-file-name=crt1.o`.
# Not needed when targeting MacOS.
crt_dir=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26100.0\ucrt\x64
# The directory that contains `vcruntime.lib`.
# Only needed when targeting MSVC on Windows.
msvc_lib_dir=C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.51.36231\Lib\x64
# The directory that contains `kernel32.lib`.
# Only needed when targeting MSVC on Windows.
kernel32_lib_dir=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26100.0\um\x64
# The directory that contains `crtbeginS.o` and `crtendS.o`
# Only needed when targeting Haiku.
gcc_dir=
To install the SDK from visual studio, look in individual components:
If the PATH does not include C:\Program Files (x86)\Windows Kits\10\bin you can either add it or copy the files from redist into your application folder.