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

Errors building on Windows... #2

Closed
moebiussurfing opened this issue Sep 18, 2022 · 7 comments
Closed

Errors building on Windows... #2

moebiussurfing opened this issue Sep 18, 2022 · 7 comments

Comments

@moebiussurfing
Copy link

Hello ,
thanks for sharing!
I just want to test some of the compiled widgets to see if they can be useful to my projects.

How can I build the demo app to test it?
Any tips?
I made the typical cmake .. but I am getting some errors related to VkShader:

PS D:\_CODE\_C\imgui> mkdir build


    Directory: D:\_CODE\_C\imgui


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         9/18/2022   8:29 PM                build


PS D:\_CODE\_C\imgui> cd build
PS D:\_CODE\_C\imgui\build> cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.33.31630.0
-- The CXX compiler identification is MSVC 19.33.31630.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/H
ostx64/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: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin
/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version "1.8.0")
-- Target arch: x86
-- Found OpenGL: opengl32
-- Found Vulkan: C:/VulkanSDK/1.3.216.0/Lib/vulkan-1.lib (found version "1.3.216")
-- Checking for one of the modules 'zlib'
zlib found
-- Checking for one of the modules 'glew'
-- Checking for one of the modules 'glfw3'
-- Checking for one of the modules 'freetype2'
freetype found
-- Checking for one of the modules 'sdl2'
sdl2 found
--     [ImGui with OpenGL support]
--     [ImGui with GLEW support]
--     [ImGui with SDL2 support]
--     [ImGui backend rendering with Vulkan]
--     [ImGui backend platform with SDL2]
--     [ImGui backend platform with GLFW]
--     [ImGui backend platform with Win32]
--     [ImGui Internal UTF-8 Font] WeiHei
--     [ImGui Internal Latin Font] MonoNarrow
-- Target arch: x86
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- VkShader(Windows) Use OpenMP
-- Could NOT find Glslang (missing: Glslang_LIBRARY Glslang_SPIRV_LIBRARY Glslang_INCLUDE_DIR)
-- Could NOT find SpirvTools (missing: SpirvTools_LIBRARY SpirvTools_INCLUDE_DIR)
-- VkShader Found system glslang library
-- VkShader Found system SPRIV-Tools library
--     [ImGui application platform with SDL2]
--     [ImGui application rendering with Vulkan]
-- Configuring done
CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "Glslang::Glslang"
  configuration "Debug".


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "Glslang::Glslang"
  configuration "Release".


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "Glslang::Glslang"
  configuration "MinSizeRel".


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "Glslang::Glslang"
  configuration "RelWithDebInfo".


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "VkShader" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "Glslang_INCLUDE_DIR-NOTFOUND"


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "Glslang::Glslang"
  configuration "Debug".


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "Glslang::Glslang"
  configuration "Release".


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "Glslang::Glslang"
  configuration "MinSizeRel".


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "Glslang::Glslang"
  configuration "RelWithDebInfo".


CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in addon/ImVulkanShader/CMakeLists.txt:
  Imported target "Glslang::Glslang" includes non-existent path

    "Glslang_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
@DickyQi
Copy link
Collaborator

DickyQi commented Sep 19, 2022

If you wanna imgui support vulkan shader, then you need install vulkan sdk for windows and install glslang in mingw environment. You can use following command in mingw64 env:
#pacman -S mingw-w64-x86_64-glslang mingw-w64-x86_64-spirv-headers mingw-w64-x86_64-spirv-tools mingw-w64-x86_64-vulkan-headers mingw-w64-x86_64-vulkan-loader

Vulkan SDK installation please goto LunarXchange

If you only need widgets, just disable vulkan shader build at Cmake configure.
Sorry for incomplete documentation, we will supplement later.

@moebiussurfing
Copy link
Author

Thanks.
I did the above steps, but I am getting this error:

-- Checking for one of the modules 'gl'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'gl' found
Call Stack (most recent call first):
  CMakeLists.txt:162 (pkg_search_module)

I searched the error without success, probably needs to install some GL installer?

moebiussurfing@surfingMachine MINGW64 ~
$ cd /d/_CODE/_C/imgui

moebiussurfing@surfingMachine MINGW64 /d/_CODE/_C/imgui
$ mkdir build

moebiussurfing@surfingMachine MINGW64 /d/_CODE/_C/imgui
$ cd build

moebiussurfing@surfingMachine MINGW64 /d/_CODE/_C/imgui/build
$ cmake ..
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /mingw64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /mingw64/bin/CC.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /mingw64/bin/pkg-config.exe (found version "1.8.0")
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY)
-- Could NOT find Vulkan (missing: Vulkan_LIBRARY)
-- Checking for one of the modules 'zlib'
zlib found
-- Checking for one of the modules 'glew'
-- Checking for one of the modules 'glfw3'
-- Checking for one of the modules 'vulkan'
vulkan found
-- Checking for one of the modules 'gl'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'gl' found
Call Stack (most recent call first):
  CMakeLists.txt:162 (pkg_search_module)


-- Checking for one of the modules 'freetype2'
freetype found
-- Checking for one of the modules 'sdl2'
sdl2 found
--     [ImGui with GLEW support]
--     [ImGui with SDL2 support]
--     [ImGui backend rendering with Vulkan]
--     [ImGui backend platform with SDL2]
--     [ImGui backend platform with GLFW]
--     [ImGui Internal UTF-8 Font] WeiHei
--     [ImGui Internal Latin Font] MonoNarrow
-- Found Vulkan: vulkan
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Found OpenMP_C: -fopenmp (found version "4.5")
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- VkShader Use OpenMP
-- Found Glslang: /mingw64/lib/libglslang.a
-- Looking for pthread.h
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
System is unknown to cmake, create:
Platform/MINGW64_NT-10.0-19044 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found SpirvTools: /mingw64/include
-- VkShader Found system glslang library
-- VkShader Found system SPIRV library
-- VkShader Found system SPRIV-Tools library
--     [ImGui application platform with SDL2]
--     [ImGui application rendering with Vulkan]
-- Configuring incomplete, errors occurred!
See also "/d/_CODE/_C/imgui/build/CMakeFiles/CMakeOutput.log".

@moebiussurfing
Copy link
Author

moebiussurfing commented Sep 19, 2022

PS:
I tried this but getting the same error
pacman -Ss glew
and
$ pacman -S mingw-w64-x86_64-glew

@DickyQi
Copy link
Collaborator

DickyQi commented Sep 20, 2022

for GL support, please install glfw and glew
#pacman -S mingw-w64-x86_64-glew mingw-w64-x86_64-glfw
for SDL support, please install SDL and SDL-image
#pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image
other dependence such as truetype, openmp, ncurses
#pacman -S mingw-w64-x86_64-freetype mingw-w64-x86_64-gmp mingw-w64-x86_64-ncurses
please try it again.

@DickyQi DickyQi closed this as completed Sep 21, 2022
@moebiussurfing
Copy link
Author

Hey, sorry to still boring you again,
but I'm still getting errors after all the steps.
I keep tuned to the README for updates on the installation info, (if that's the case)
Thanks for sharing!
I'll try again.

moebiussurfing@surfingMachine MSYS /d/_CODE/_C/imgui/build
$ cmake ..
-- Target arch: x86
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY)
-- Could NOT find Vulkan (missing: Vulkan_LIBRARY)
-- Checking for one of the modules 'zlib'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'zlib' found
Call Stack (most recent call first):
  CMakeLists.txt:138 (pkg_search_module)


-- Checking for one of the modules 'glew'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'glew' found
Call Stack (most recent call first):
  CMakeLists.txt:143 (pkg_search_module)


-- Checking for one of the modules 'glfw3'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'glfw3' found
Call Stack (most recent call first):
  CMakeLists.txt:146 (pkg_search_module)


-- Checking for one of the modules 'vulkan'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'vulkan' found
Call Stack (most recent call first):
  CMakeLists.txt:155 (pkg_search_module)


-- Checking for one of the modules 'gl'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'gl' found
Call Stack (most recent call first):
  CMakeLists.txt:162 (pkg_search_module)


-- Checking for one of the modules 'freetype2'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'freetype2' found
Call Stack (most recent call first):
  CMakeLists.txt:168 (pkg_search_module)


-- Checking for one of the modules 'sdl2'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'sdl2' found
Call Stack (most recent call first):
  CMakeLists.txt:173 (pkg_search_module)


--     [ImGui Internal UTF-8 Font] WeiHei
--     [ImGui Internal Latin Font] MonoNarrow
-- Could NOT find Vulkan (missing: Vulkan_LIBRARY)
-- Target arch: x86
-- VkShader Use OpenMP
-- Checking for one of the modules 'vulkan'
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPkgConfig.cmake:890 (message):
  None of the required 'vulkan' found
Call Stack (most recent call first):
  addon/ImVulkanShader/CMakeLists.txt:80 (pkg_search_module)


-- Could NOT find Glslang (missing: Glslang_LIBRARY Glslang_SPIRV_LIBRARY Glslang_INCLUDE_DIR)
-- Could NOT find SpirvTools (missing: SpirvTools_LIBRARY SpirvTools_INCLUDE_DIR)
-- VkShader Found system glslang library
-- VkShader Found system SPRIV-Tools library
CMake Warning at CMakeLists.txt:1071 (message):
  No Application Backend Found! IMGUI_APPS will be turned off.


-- Configuring incomplete, errors occurred!
See also "/d/_CODE/_C/imgui/build/CMakeFiles/CMakeOutput.log".

@DickyQi
Copy link
Collaborator

DickyQi commented Sep 23, 2022

@moebiussurfing which env you are using for Cmake configure? is msys2 for mingw64? We test it only for mingw64 env, Maybe you need check it.

@DickyQi
Copy link
Collaborator

DickyQi commented Sep 23, 2022

@moebiussurfing We are easily using VS code + Cmake + mingw32 + make. In Windows, we also set mingw64/bin into PATH env value, just FYI.

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