google / shaderc-rs

Rust bindings for the shaderc library.
https://docs.rs/shaderc
Apache License 2.0
261 stars 64 forks source link

Cannot find native shaderc library on system #127

Closed AntonioNoack closed 1 year ago

AntonioNoack commented 1 year ago

Hello, I want to use shaderc-rs, but I cannot compile it. I don't care whether it is built from source, but it fails either way.

image

Vulkan SDK 1.3.216.0 is installed, and exists at that location, and after updating Vulkan to 1.3.224.1 the issue persists.

CMake 3.25.0-rc1 is installed and added to the PATH. Python 3.10 as well, GCC 11.3.0 too via Cygwin.

AntonioNoack commented 1 year ago

This is the error with updated Vulkan (practically the same): image

AntonioNoack commented 1 year ago

I installed CMake and GCC after cargo, if that matters, oh and system info: OS: Windows 10 Personal; CPU: Ryzen 5 2600, GPU: RTX 3070, Memory: 32 GB DDR4

AntonioNoack commented 1 year ago

I was able to resolve that error by defining the environment variables "CMAKE" and "CMAKE_GENERATOR" manually; the first one to "C:\Program Files\CMake\bin\cmake.exe" and the second one to "MinGW Makefiles"

AntonioNoack commented 1 year ago

*it just wasn't shown once... I am able to get a different error now, which says that MinGW can't be used even though I thought it kind of is part of Cygwin, and I have installed a few MinGW packages there...

and it's still not finding the sources...

AntonioNoack commented 1 year ago

Ok, it compiled now :). I had to define "SHADERC_LIB_DIR" to "C:\VulkanSDK\1.3.224.1\Bin". Notice: Even though the environment variable is called "LIB", it wants the "Bin" folder, not the "Lib" folder