ctreffs / SwiftVulkan

Swift Vulkan SDK bindings for macOS and Linux
MIT License
9 stars 1 forks source link

Windows Support #17

Open ResourceHog opened 8 months ago

ResourceHog commented 8 months ago

Hey, I've been trying to see if I could get this to support windows and I'm running into the following issue.

image Added lines 15-20 into the shim but when I run the tests I get the following build error.

image

I'm hoping that I'm far enough in that the error looks familiar to anyone here. I don't know why it's looking for Vulkan.lib. The sdk doesn't contain the file. The closest I found was Vulkan-1.lib...

ResourceHog commented 8 months ago

So it that it's trying to link the wrong library. Vulkan.lib doesn't exist on the windows installation of VulkanSDK and in fact Vulkan-1.lib is the proper lib to link.

I had to change the modulemap to this image

Then build it with the following command to tell it where to find the relevant includes and libs on windows.

swift build -Xcc -I"C:\VulkanSDK\1.3.280.0\Include" -Xlinker -L"C:\VulkanSDK\1.3.280.0\Lib"

Are the libraries needed to import different based on the platform?