Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building examples failed : error C2039: 'add_glsl': is not a member of 'vuk::PipelineBaseCreateInfo' #44

Closed
dawnarc opened this issue Mar 19, 2022 · 11 comments

Comments

@dawnarc
Copy link

dawnarc commented Mar 19, 2022

D:\workspace\graphics_dev\vuk\examples\build>cmake --build .
[41/148] Building CXX object CMakeFiles\vuk_all_examples.dir\01_triangle.cpp.obj
FAILED: CMakeFiles/vuk_all_examples.dir/01_triangle.cpp.obj
"D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGLM_ENABLE_EXPERIMENTAL -DGLM_FORCE_DEPTH_ZERO_TO_ONE -DGLM_FORCE_EXPLICIT_CTOR -DGLM_FORCE_RADIANS -DGLM_FORCE_SIZE_FUNC -ID:\workspace\graphics_dev\vuk\examples\build\_deps\vk-bootstrap-src\src -ID:\SDKs\VulkanSDK\1.3.204.0\Include -ID:\workspace\graphics_dev\vuk\examples\build\_deps\glfw-src\include -ID:\workspace\graphics_dev\vuk\examples\build\_deps\glm-src\glm\.. -ID:\workspace\graphics_dev\vuk\examples\..\ext\stb -ID:\workspace\graphics_dev\vuk\examples\..\ext\imgui -ID:\workspace\graphics_dev\vuk\examples\..\ext\plf_colony -ID:\workspace\graphics_dev\vuk\examples\..\include /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /std:c++latest /permissive- /Zc:char8_t- /showIncludes /FoCMakeFiles\vuk_all_examples.dir\01_triangle.cpp.obj /FdCMakeFiles\vuk_all_examples.dir\ /FS -c D:\workspace\graphics_dev\vuk\examples\01_triangle.cpp
D:\workspace\graphics_dev\vuk\examples\build\_deps\vk-bootstrap-src\src\VkBootstrap.h(1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
D:\workspace\graphics_dev\vuk\examples\01_triangle.cpp(21): error C2039: 'add_glsl': is not a member of 'vuk::PipelineBaseCreateInfo'
D:\workspace\graphics_dev\vuk\include\vuk\Pipeline.hpp(62): note: see declaration of 'vuk::PipelineBaseCreateInfo'
D:\workspace\graphics_dev\vuk\examples\01_triangle.cpp(22): error C2039: 'add_glsl': is not a member of 'vuk::PipelineBaseCreateInfo'
D:\workspace\graphics_dev\vuk\include\vuk\Pipeline.hpp(62): note: see declaration of 'vuk::PipelineBaseCreateInfo'
[42/148] Building CXX object CMakeFiles\vuk_example_01_triangle.dir\01_triangle.cpp.obj
@martty
Copy link
Owner

martty commented Mar 19, 2022

Hi,

Most of the examples require shaderc (VUK_USE_SHADERC) to power add_glsl - you need to enable this for them to compile (it is enabled by default). Shaderc is not required if you use DXC or SPIRV only in your application, but for the examples you need it. Let me know if you have trouble.

@dawnarc
Copy link
Author

dawnarc commented Mar 19, 2022

@martty Hi, thanks for your reply.
I'm not sure if the steps I built is correct, follows are the commands I executed:

D:\workspace\graphics_dev\vuk\examples\build>cmake .. -G Ninja
-- The C compiler identification is MSVC 19.29.30137.0
-- The CXX compiler identification is MSVC 19.29.30137.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Program_Filesx86/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Program_Filesx86/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Vulkan: D:/SDKs/VulkanSDK/1.3.204.0/Lib/vulkan-1.lib
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Using Win32 for window creation
-- Configuring done
-- Generating done
-- Build files have been written to: D:/workspace/graphics_dev/vuk/examples/build

D:\workspace\graphics_dev\vuk\examples\build>cmake --build .

Even I commented the VUK_USE_SHADERC check, then rebuild vuk.lib and examples, it also doesn't work:
image
image
image

@martty
Copy link
Owner

martty commented Mar 19, 2022

Very odd - does commenting out the directive not change the error at all?

@dawnarc
Copy link
Author

dawnarc commented Mar 19, 2022

@martty sorry, I forgot to post the errors, yep, error has changed:

D:\workspace\graphics_dev\vuk\examples\build>cmake --build .
[9/109] Building CXX object CMakeFiles\vuk_all_examples.dir\imgui.cpp.obj
FAILED: CMakeFiles/vuk_all_examples.dir/imgui.cpp.obj
"D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGLM_ENABLE_EXPERIMENTAL -DGLM_FORCE_DEPTH_ZERO_TO_ONE -DGLM_FORCE_EXPLICIT_CTOR -DGLM_FORCE_RADIANS -DGLM_FORCE_SIZE_FUNC -ID:\workspace\graphics_dev\vuk\examples\build\_deps\vk-bootstrap-src\src -ID:\SDKs\VulkanSDK\1.3.204.0\Include -ID:\workspace\graphics_dev\vuk\examples\build\_deps\glfw-src\include -ID:\workspace\graphics_dev\vuk\examples\build\_deps\glm-src\glm\.. -ID:\workspace\graphics_dev\vuk\examples\..\ext\stb -ID:\workspace\graphics_dev\vuk\examples\..\ext\imgui -ID:\workspace\graphics_dev\vuk\examples\..\ext\plf_colony -ID:\workspace\graphics_dev\vuk\examples\..\include /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /std:c++latest /permissive- /Zc:char8_t- /showIncludes /FoCMakeFiles\vuk_all_examples.dir\imgui.cpp.obj /FdCMakeFiles\vuk_all_examples.dir\ /FS -c D:\workspace\graphics_dev\vuk\examples\imgui.cpp
D:\workspace\graphics_dev\vuk\examples\build\_deps\vk-bootstrap-src\src\VkBootstrap.h(1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
D:\workspace\graphics_dev\vuk\include\vuk\Pipeline.hpp(74): error C2039: 'glsl': is not a member of 'vuk::ShaderSource'
D:\workspace\graphics_dev\vuk\include\vuk/ShaderSource.hpp(31): note: see declaration of 'vuk::ShaderSource'
D:\workspace\graphics_dev\vuk\include\vuk\Pipeline.hpp(74): error C3861: 'glsl': identifier not found
[10/109] Building CXX object CMakeFiles\vuk_example_01_triangle.dir\example_runner_single.cpp.obj
FAILED: CMakeFiles/vuk_example_01_triangle.dir/example_runner_single.cpp.obj

@dawnarc
Copy link
Author

dawnarc commented Mar 19, 2022

sorry, I forgot to comment in ShaderSource.hpp :
image
Now compilation has completed, but there're new errors on linking:

D:\workspace\graphics_dev\vuk\examples\build>cmake --build .
[35/55] Building CXX object _deps\vk-bootstrap-build\CMakeFiles\vk-bootstrap.dir\src\VkBootstrap.cpp.obj
cl : Command line warning D9025 : overriding '/W3' with '/W4'
[37/55] Linking CXX executable vuk_example_09_persistent_descriptorset.exe
FAILED: vuk_example_09_persistent_descriptorset.exe
cmd.exe /C "cd . && D:\SDKs\cmake-3.21.4-windows-x86_64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\vuk_example_09_persistent_descriptorset.dir --rc="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" --mt="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\mt.exe" --manifests  -- "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\vuk_example_09_persistent_descriptorset.dir\09_persistent_descriptorset.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\example_runner_single.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\imgui.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\stbi.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_draw.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_demo.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_widgets.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_tables.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\backends\imgui_impl_glfw.cpp.obj  /out:vuk_example_09_persistent_descriptorset.exe /implib:vuk_example_09_persistent_descriptorset.lib /pdb:vuk_example_09_persistent_descriptorset.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  vuk.lib  _deps\vk-bootstrap-build\vk-bootstrap.lib  _deps\glfw-build\src\glfw3.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe /nologo CMakeFiles\vuk_example_09_persistent_descriptorset.dir\09_persistent_descriptorset.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\example_runner_single.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\imgui.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\stbi.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_draw.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_demo.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_widgets.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_tables.cpp.obj CMakeFiles\vuk_example_09_persistent_descriptorset.dir\D_\workspace\graphics_dev\vuk\ext\imgui\backends\imgui_impl_glfw.cpp.obj /out:vuk_example_09_persistent_descriptorset.exe /implib:vuk_example_09_persistent_descriptorset.lib /pdb:vuk_example_09_persistent_descriptorset.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console vuk.lib _deps\vk-bootstrap-build\vk-bootstrap.lib _deps\glfw-build\src\glfw3.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\vuk_example_09_persistent_descriptorset.dir/intermediate.manifest CMakeFiles\vuk_example_09_persistent_descriptorset.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'vuk.lib'

@martty
Copy link
Owner

martty commented Mar 19, 2022

Still odd - seems like the buildsystem is getting confused and not building the lib? Can you do a clean and rebuild?

@dawnarc
Copy link
Author

dawnarc commented Mar 19, 2022

I have cleaned and rebuilt vuk and examples, but there's also a linking error:

D:\workspace\graphics_dev\vuk\examples\build>cmake --build .
[124/148] Building CXX object _deps\vk-bootstrap-build\CMakeFiles\vk-bootstrap.dir\src\VkBootstrap.cpp.obj
cl : Command line warning D9025 : overriding '/W3' with '/W4'
[126/148] Linking CXX executable vuk_all_examples.exe
FAILED: vuk_all_examples.exe
cmd.exe /C "cd . && D:\SDKs\cmake-3.21.4-windows-x86_64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\vuk_all_examples.dir --rc="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" --mt="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\mt.exe" --manifests  -- "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\vuk_all_examples.dir\example_browser.cpp.obj CMakeFiles\vuk_all_examples.dir\imgui.cpp.obj CMakeFiles\vuk_all_examples.dir\stbi.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_draw.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_demo.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_widgets.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_tables.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\backends\imgui_impl_glfw.cpp.obj CMakeFiles\vuk_all_examples.dir\01_triangle.cpp.obj CMakeFiles\vuk_all_examples.dir\02_cube.cpp.obj CMakeFiles\vuk_all_examples.dir\03_multipass.cpp.obj CMakeFiles\vuk_all_examples.dir\04_texture.cpp.obj CMakeFiles\vuk_all_examples.dir\05_deferred.cpp.obj CMakeFiles\vuk_all_examples.dir\06_msaa.cpp.obj CMakeFiles\vuk_all_examples.dir\07_commands.cpp.obj CMakeFiles\vuk_all_examples.dir\08_pipelined_compute.cpp.obj CMakeFiles\vuk_all_examples.dir\09_persistent_descriptorset.cpp.obj CMakeFiles\vuk_all_examples.dir\10_baby_renderer.cpp.obj  /out:vuk_all_examples.exe /implib:vuk_all_examples.lib /pdb:vuk_all_examples.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  vuk.lib  _deps\vk-bootstrap-build\vk-bootstrap.lib  _deps\glfw-build\src\glfw3.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe /nologo CMakeFiles\vuk_all_examples.dir\example_browser.cpp.obj CMakeFiles\vuk_all_examples.dir\imgui.cpp.obj CMakeFiles\vuk_all_examples.dir\stbi.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_draw.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_demo.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_widgets.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\imgui_tables.cpp.obj CMakeFiles\vuk_all_examples.dir\D_\workspace\graphics_dev\vuk\ext\imgui\backends\imgui_impl_glfw.cpp.obj CMakeFiles\vuk_all_examples.dir\01_triangle.cpp.obj CMakeFiles\vuk_all_examples.dir\02_cube.cpp.obj CMakeFiles\vuk_all_examples.dir\03_multipass.cpp.obj CMakeFiles\vuk_all_examples.dir\04_texture.cpp.obj CMakeFiles\vuk_all_examples.dir\05_deferred.cpp.obj CMakeFiles\vuk_all_examples.dir\06_msaa.cpp.obj CMakeFiles\vuk_all_examples.dir\07_commands.cpp.obj CMakeFiles\vuk_all_examples.dir\08_pipelined_compute.cpp.obj CMakeFiles\vuk_all_examples.dir\09_persistent_descriptorset.cpp.obj CMakeFiles\vuk_all_examples.dir\10_baby_renderer.cpp.obj /out:vuk_all_examples.exe /implib:vuk_all_examples.lib /pdb:vuk_all_examples.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console vuk.lib _deps\vk-bootstrap-build\vk-bootstrap.lib _deps\glfw-build\src\glfw3.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\vuk_all_examples.dir/intermediate.manifest CMakeFiles\vuk_all_examples.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'vuk.lib'

then I try to set library path of vuk.lib in CMakeLists.txt of examples, even I copy vuk.lib into examples directory, it also build failed:
image
image

cmake version I used is 3.21.4, I'm not sure if it's the issue of cmake version?
image

@martty
Copy link
Owner

martty commented Mar 19, 2022

Oh I see now what is happening - you are not supposed to generate from the examples directory. Generate from the top level CMakeLists.txt - that is what makes the vuk target. If you have the VUK_BUILD_EXAMPLES turned on (eg. you generated with -DVUK_BUILD_EXAMPLES=1), then the examples will get built for you.

@dawnarc
Copy link
Author

dawnarc commented Mar 19, 2022

You're right, I made a mistake, it build successfully while I appended -DVUK_BUILD_EXAMPLES=1 in command from the top level of CMakeLists.txt. Thanks for you suggestion :)
image
There's another issue is that vuk_example_04_texture.exe, vuk_example_09_persistent_descriptorset.exe and vuk_all_examples.exe build failed.

D:\workspace\graphics_dev\vuk\build\debug>cmake --build .
[35/55] Building CXX object _deps\vk-bootstrap-build\CMakeFiles\vk-bootstrap.dir\src\VkBootstrap.cpp.obj
cl : Command line warning D9025 : overriding '/W3' with '/W4'
[43/55] Linking CXX executable vuk_all_examples.exe
FAILED: vuk_all_examples.exe
cmd.exe /C "cd . && D:\SDKs\cmake-3.21.4-windows-x86_64\bin\cmake.exe -E vs_link_exe --intdir=examples\CMakeFiles\vuk_all_examples.dir --rc="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" --mt="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\mt.exe" --manifests  -- "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe" /nologo examples\CMakeFiles\vuk_all_examples.dir\example_browser.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\imgui.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\stbi.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui_draw.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui_demo.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui_widgets.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui_tables.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\backends\imgui_impl_glfw.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\01_triangle.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\02_cube.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\03_multipass.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\04_texture.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\05_deferred.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\06_msaa.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\07_commands.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\08_pipelined_compute.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\09_persistent_descriptorset.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\10_baby_renderer.cpp.obj  /out:vuk_all_examples.exe /implib:examples\vuk_all_examples.lib /pdb:vuk_all_examples.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  vuk.lib  _deps\vk-bootstrap-build\vk-bootstrap.lib  _deps\glfw-build\src\glfw3.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\shaderc_shared.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\dxcompiler.lib  ext\SPIRV-Cross\spirv-cross-cored.lib  ext\VulkanMemoryAllocator\src\VulkanMemoryAllocator.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\vulkan-1.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FINAL LINK: command "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe /nologo examples\CMakeFiles\vuk_all_examples.dir\example_browser.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\imgui.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\stbi.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui_draw.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui_demo.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui_widgets.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\imgui_tables.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\__\ext\imgui\backends\imgui_impl_glfw.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\01_triangle.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\02_cube.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\03_multipass.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\04_texture.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\05_deferred.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\06_msaa.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\07_commands.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\08_pipelined_compute.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\09_persistent_descriptorset.cpp.obj examples\CMakeFiles\vuk_all_examples.dir\10_baby_renderer.cpp.obj /out:vuk_all_examples.exe /implib:examples\vuk_all_examples.lib /pdb:vuk_all_examples.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console vuk.lib _deps\vk-bootstrap-build\vk-bootstrap.lib _deps\glfw-build\src\glfw3.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\shaderc_shared.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\dxcompiler.lib ext\SPIRV-Cross\spirv-cross-cored.lib ext\VulkanMemoryAllocator\src\VulkanMemoryAllocator.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\vulkan-1.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:examples\CMakeFiles\vuk_all_examples.dir/intermediate.manifest examples\CMakeFiles\vuk_all_examples.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'vuk_all_examples.exe'
[44/55] Linking CXX executable vuk_example_04_texture.exe
FAILED: vuk_example_04_texture.exe
cmd.exe /C "cd . && D:\SDKs\cmake-3.21.4-windows-x86_64\bin\cmake.exe -E vs_link_exe --intdir=examples\CMakeFiles\vuk_example_04_texture.dir --rc="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" --mt="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\mt.exe" --manifests  -- "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe" /nologo examples\CMakeFiles\vuk_example_04_texture.dir\04_texture.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\example_runner_single.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\imgui.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\stbi.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui_draw.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui_demo.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui_widgets.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui_tables.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\backends\imgui_impl_glfw.cpp.obj  /out:vuk_example_04_texture.exe /implib:examples\vuk_example_04_texture.lib /pdb:vuk_example_04_texture.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  vuk.lib  _deps\vk-bootstrap-build\vk-bootstrap.lib  _deps\glfw-build\src\glfw3.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\shaderc_shared.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\dxcompiler.lib  ext\SPIRV-Cross\spirv-cross-cored.lib  ext\VulkanMemoryAllocator\src\VulkanMemoryAllocator.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\vulkan-1.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FINAL LINK: command "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe /nologo examples\CMakeFiles\vuk_example_04_texture.dir\04_texture.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\example_runner_single.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\imgui.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\stbi.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui_draw.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui_demo.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui_widgets.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\imgui_tables.cpp.obj examples\CMakeFiles\vuk_example_04_texture.dir\__\ext\imgui\backends\imgui_impl_glfw.cpp.obj /out:vuk_example_04_texture.exe /implib:examples\vuk_example_04_texture.lib /pdb:vuk_example_04_texture.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console vuk.lib _deps\vk-bootstrap-build\vk-bootstrap.lib _deps\glfw-build\src\glfw3.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\shaderc_shared.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\dxcompiler.lib ext\SPIRV-Cross\spirv-cross-cored.lib ext\VulkanMemoryAllocator\src\VulkanMemoryAllocator.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\vulkan-1.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:examples\CMakeFiles\vuk_example_04_texture.dir/intermediate.manifest examples\CMakeFiles\vuk_example_04_texture.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'vuk_example_04_texture.exe'
[45/55] Linking CXX executable vuk_example_09_persistent_descriptorset.exe
FAILED: vuk_example_09_persistent_descriptorset.exe
cmd.exe /C "cd . && D:\SDKs\cmake-3.21.4-windows-x86_64\bin\cmake.exe -E vs_link_exe --intdir=examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir --rc="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" --mt="D:\Program_Filesx86\Windows Kits\10\bin\10.0.19041.0\x64\mt.exe" --manifests  -- "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe" /nologo examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\09_persistent_descriptorset.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\example_runner_single.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\imgui.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\stbi.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui_draw.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui_demo.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui_widgets.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui_tables.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\backends\imgui_impl_glfw.cpp.obj  /out:vuk_example_09_persistent_descriptorset.exe /implib:examples\vuk_example_09_persistent_descriptorset.lib /pdb:vuk_example_09_persistent_descriptorset.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  vuk.lib  _deps\vk-bootstrap-build\vk-bootstrap.lib  _deps\glfw-build\src\glfw3.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\shaderc_shared.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\dxcompiler.lib  ext\SPIRV-Cross\spirv-cross-cored.lib  ext\VulkanMemoryAllocator\src\VulkanMemoryAllocator.lib  D:\SDKs\VulkanSDK\1.3.204.0\Lib\vulkan-1.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FINAL LINK: command "D:\Program_Filesx86\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\link.exe /nologo examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\09_persistent_descriptorset.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\example_runner_single.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\imgui.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\stbi.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui_draw.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui_demo.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui_widgets.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\imgui_tables.cpp.obj examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir\__\ext\imgui\backends\imgui_impl_glfw.cpp.obj /out:vuk_example_09_persistent_descriptorset.exe /implib:examples\vuk_example_09_persistent_descriptorset.lib /pdb:vuk_example_09_persistent_descriptorset.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console vuk.lib _deps\vk-bootstrap-build\vk-bootstrap.lib _deps\glfw-build\src\glfw3.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\shaderc_shared.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\dxcompiler.lib ext\SPIRV-Cross\spirv-cross-cored.lib ext\VulkanMemoryAllocator\src\VulkanMemoryAllocator.lib D:\SDKs\VulkanSDK\1.3.204.0\Lib\vulkan-1.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir/intermediate.manifest examples\CMakeFiles\vuk_example_09_persistent_descriptorset.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'vuk_example_09_persistent_descriptorset.exe'
[53/55] Linking CXX executable vuk_example_06_msaa.exe
ninja: build stopped: subcommand failed.

@martty
Copy link
Owner

martty commented Mar 19, 2022

Since the linker is unable to open the output file for writing (and intermittently) can suggest that this could be an anti-virus software locking the newly created file or something similar. Try rerunning - to my knowledge there is no difference between the build configuration of the examples, so either all should link or none.

@dawnarc
Copy link
Author

dawnarc commented Mar 19, 2022

I restart my PC, and rebuild it successfully, thank again Marcell!
vuk_all_examples_hYKwzKKzwv

@dawnarc dawnarc closed this as completed Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants