Traverse-Research / gpu-allocator

🦀 GPU memory allocator for Vulkan, DirectX 12 and Metal. Written in pure Rust

Home Page:https://traverse.nl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't compile version 0.10.0

michidk opened this issue · comments

Using gpu-allocator = { version="0.10.0", features=["vulkan"] } I get the following error when building my project:

   Compiling gpu-allocator v0.10.0
error: linking with `link.exe` failed: exit code: 1181
  |
  = note: [...]
  = note: LINK : fatal error LNK1181: cannot open input file 'd3d12.lib'


error: could not compile `vulkan_engine` due to previous error
make: *** [Makefile:5: run] Error 101

@michidk d3d12 is enabled by default:

default = ["d3d12", "vulkan", "public-winapi"]

You can disable this by setting default-features = false and specifying just the (vulkan) feature that you may need. It is however surprising that d3d12.lib isn't found, isn't that shipped by default on Windows systems or does it need some sort of Windows SDK package?

Thank you very much for this fast response!!
This resolved it for me.

I do not have any clue of d3d12, but seems like I would need to install this: https://www.microsoft.com/en-us/download/details.aspx?id=6812

The Direct3D 12 headers and libraries are part of the Windows 10 SDK. There is no separate download or installation required to use Direct3D 12.

from https://docs.microsoft.com/en-us/windows/win32/direct3d12/directx-12-programming-environment-set-up

@michidk You're welcome - enjoy gpu-allocator and feel free to open more issues with questions and feedback 🤩

Indeed, I think you need that Windows 10/11 SDK to get the linker libraries - but only if using D3D12 😳 - we thought it was easier to make all allocator APIs available by default.