pr0g / sdl-bgfx-imgui-starter

A starter project for graphics applications using SDL, bgfx and Dear ImGui
MIT License
313 stars 33 forks source link

LINK : fatal error LNK1104: cannot open file 'C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\spirv-toolsd.lib' #16

Closed meiry closed 2 years ago

meiry commented 2 years ago

Hey , Tryin to build the startre kit , win10 64bit , VC++ 2022 got this error :

c:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party>cmake --build build
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Performing update step for 'bgfx'
  No patch step for 'bgfx'
  Performing configure step for 'bgfx'
  -- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19043.
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx/build
  Performing build step for 'bgfx'
  Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.

    Checking Build System
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    astc.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\astcd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    astc-codec.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\astc-codecd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    bx.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\bxd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    edtaa3.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\edtaa3d.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    etc1.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\etc1d.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    etc2.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\etc2d.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    iqa.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\iqad.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    nvtt.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\nvttd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    pvrtc.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\pvrtcd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    squish.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\squishd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    tinyexr.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\tinyexrd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    bimg.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\bimgd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    bgfx.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\bgfxd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    fcpp.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\fcppd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    meshoptimizer.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\meshoptimizerd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    geometryc.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\geometryc.exe
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    dear-imgui.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\dear-imguid.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    example-common.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\example-commond.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    geometryv.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\geometryv.exe
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    glcpp.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\glcppd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    mesa.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\mesad.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    glsl-optimizer.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\glsl-optimizerd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    glslang.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\glslangd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    spirv-cross.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\spirv-crossd.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
LINK : fatal error LNK1104: cannot open file 'C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\spirv-toolsd.lib' [C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\spirv
-tools.vcxproj] [C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx.vcxproj]
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    texturec.cpp
       Creating library C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx/build/Debug/texturec.lib and object C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx/build/Debug/texturec.exp
    texturec.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\texturec.exe
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx-prefix/src/bgfx/CMakeLists.txt
    texturev.cpp
C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx-prefix\src\bgfx\bgfx\3rdparty\dear-imgui\widgets/memory_editor.h(20,13): warning C4996: 'strcpy': This function or variable may be unsafe. Consider
using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\texturev.vcxproj] [C:\dev\my\cpp\sd
l-bgfx-imgui-starter\third-party\build\bgfx.vcxproj]
C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx-prefix\src\bgfx\bgfx\3rdparty\dear-imgui\widgets/memory_editor.h(21,13): warning C4996: 'strcpy': This function or variable may be unsafe. Consider
using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\texturev.vcxproj] [C:\dev\my\cpp\sd
l-bgfx-imgui-starter\third-party\build\bgfx.vcxproj]
       Creating library C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx/build/Debug/texturev.lib and object C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/bgfx/build/Debug/texturev.exp
    texturev.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgfx\build\Debug\texturev.exe
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(242,5): error MSB8066: Custom build for 'C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\CM
akeFiles\91c4a5e23bc15095b2da2fac268ecfc1\bgfx-update.rule;C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\CMakeFiles\91c4a5e23bc15095b2da2fac268ecfc1\bgfx-patch.rule;C:\dev\my\cpp\sdl-bgfx-imgui-start
er\third-party\build\CMakeFiles\91c4a5e23bc15095b2da2fac268ecfc1\bgfx-configure.rule;C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\CMakeFiles\91c4a5e23bc15095b2da2fac268ecfc1\bgfx-build.rule;C:\dev\m
y\cpp\sdl-bgfx-imgui-starter\third-party\build\CMakeFiles\91c4a5e23bc15095b2da2fac268ecfc1\bgfx-install.rule;C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\CMakeFiles\47218f6ffe17cb1a08339cee0e6bf7d3\
bgfx-complete.rule;C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\CMakeFiles\e3a0df0db7afd2eaad2a5d96f3e16bfb\bgfx.rule' exited with code 1. [C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\bgf
x.vcxproj]
  Creating directories for 'imgui.cmake'
  Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/CMakeLists.txt
  Performing download step (git clone) for 'imgui.cmake'
  Cloning into 'imgui.cmake'...
  HEAD is now at 7e417a3 update imgui library
  Submodule 'imgui' (https://github.com/ocornut/imgui) registered for path 'imgui'
  Cloning into 'C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/imgui.cmake-prefix/src/imgui.cmake/imgui'...
  Submodule path 'imgui': checked out '07efd7cc2053099c2f29e65b33e03d56a4b8d53c'
  Performing update step for 'imgui.cmake'
  No patch step for 'imgui.cmake'
  Performing configure step for 'imgui.cmake'
  -- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19043.
  -- The CXX compiler identification is MSVC 19.30.30705.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/imgui/build
  Performing build step for 'imgui.cmake'
  Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.

    Checking Build System
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/imgui.cmake-prefix/src/imgui.cmake/CMakeLists.txt
    imgui.cpp
    imgui_demo.cpp
    imgui_draw.cpp
    imgui_widgets.cpp
    imgui_tables.cpp
    Generating Code...
    imgui.cmake.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\imgui\build\Debug\imgui.cmaked.lib
    Building Custom Rule C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/imgui.cmake-prefix/src/imgui.cmake/CMakeLists.txt
  Performing install step for 'imgui.cmake'
  Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.

    imgui.cmake.vcxproj -> C:\dev\my\cpp\sdl-bgfx-imgui-starter\third-party\build\imgui\build\Debug\imgui.cmaked.lib
    -- Install configuration: "Debug"
    -- Installing: C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/lib/imgui.cmaked.lib
    -- Installing: C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/lib/cmake/imgui.cmake/imgui.cmake-config.cmake
    -- Installing: C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/lib/cmake/imgui.cmake/imgui.cmake-config-debug.cmake
    -- Installing: C:/dev/my/cpp/sdl-bgfx-imgui-starter/third-party/build/include/imgui.h
  Completed 'imgui.cmake'
pr0g commented 2 years ago

Hmm that's an odd one 🤔 Looks like bgfx for some reason is failing to build... Can you try running the terminal/command prompt as administrator and trying again in case that has anything to do with it? It might also be worth trying to open the generated bgfx solution that was generated by CMake and try to build the spirv-tools project on its own and see if you get the same error.

pr0g commented 2 years ago

Any update on this issue @meiry? Otherwise, I'll close this as stale. Thanks!

pr0g commented 2 years ago

Closing due to inactivity. Feel free to reopen in future if you're still having problems (there's recently been quite a big update to the repo so it might be worth trying again after updating).