TheCherno / Hazel

Hazel Engine
Apache License 2.0
11.68k stars 1.5k forks source link

Linking Error when compiling. #664

Open andihsu opened 8 months ago

andihsu commented 8 months ago

Visual Studio 2022 building output:

1>------ Build started: Project: Hazel, Configuration: Release x64 ------
1>LINK : fatal error LNK1181: cannot open input file '\Lib\shaderc_shared.lib'
1>Done building project "Hazel.vcxproj" -- FAILED.

I tried to put the file in the project folder, but I cannot find where has that file included.

Ggjorven commented 7 months ago

First of all make sure you have the Vulkan SDK installed.

I looked into the '\Lib\shaderc_shared.lib' You can find it in the 'Dependencies.lua' file: Library["ShaderC_Release"] = "%{LibraryDir.VulkanSDK}/shaderc_shared.lib"

the '%{LibraryDir.VulkanSDK}' is this: LibraryDir["VulkanSDK"] = "%{VULKAN_SDK}/Lib"

In your error message the filepath it cannot open is '/Lib/shaderc_shared.lib', meaning that the Vulkan SDK is probably not installed. since the path is not ...VulkanPath.../Lib/shaderc_shared.lib but just /Lib/shaderc_shared.lib.

I hope this helps. Make sure the Vulkan SDK is installed. If so recreate the projects files and try again. Goodluck!

Ggjorven commented 7 months ago

Extra note: if you have installed the Vulkan SDK on your own and it doesn't work. Try uninstalling and installing it again using the Setup.bat script.

JohnVasil-ev commented 6 months ago

@androidandyhsu Just open your VulkanSDK folder then run maintenancetool.exe -> Add or remove components -> select Shader Toolchain Debug Symbols for your architecture and next... next... After installation you will see new files in VulkanSDK dir and thats what you need

andihsu commented 6 months ago

Ok,thanks.

---Original--- From: "John @.> Date: Mon, Mar 25, 2024 04:49 AM To: @.>; Cc: @.**@.>; Subject: Re: [TheCherno/Hazel] Linking Error when compiling. (Issue #664)

@androidandyhsu Just open your VulkanSDK folder then run maintenancetool.exe -> Add or remove components -> select Shader Toolchain Debug Symbols for your architecture and next... next... After installation you will see new files in VulkanSDK dir and thats what you need

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>