0

I am trying to build the Vulkan-Samples from the Khronos git repo for Windows. I cloned and built the dependencies glslang and Vulkan-LoaderAndValidationLayers, and followed all the configuration and build steps as described. As far as I could tell there was no issue, but now when I try to generate project files with cmake -G "Visual Studio 14 Win64 ../.." from within my build directory as described here, I get the following error:

CMake Error at external/libs/glslang/CMakeLists.txt:133 (add_library):

Cannot find source file:

D:/Khronos/glslang/glslang/MachineIndependent/preprocessr/PpMemory.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

CMake Error: CMake can not determine linker language for target: glslang

Indeed, the file is missing, but I wasn't able to find out where it's supposed to come from or what steps I've missed. Any ideas?

1
  • 1
    Have you tried commenting the line and checking that the file is actually needed for the build to succeed? Or perhaps re-downloading the repository and seeing if this was a glitch that was picked up after you downloaded it? Jan 23, 2018 at 16:46

1 Answer 1

2

That file is no longer part of glslang and has been removed from it's repository last year and is therefore no longe required to built the glslang libraries.

I guess they forgot to update their samples repository to reflect these changes.

So to get the samples to compile either remove PpMemory.cpp and PpSymbols.cpp from the cmakelists.txt or (better) use the one from the current glslang repository.

A small note: The Khronos Vulkan samples repository never really took off, so you may instead want to take a look at other examples packs like the official ones from LunarG or those from my own repository.

1
  • Thanks a lot. Although the project is now generated, I still get a few build errors regarding hlsl -- the samples repo doesn't seem to be up to date. Anyways, thanks also for your note, this is valuable to know. I am currently trying to figure out where to start and meant to begin with as close to the VK API as possible. As far as I understand the LunarG stuff is more high-level as it builds upon their SDK, so I thought I'd better move to the Khronos samples. I also checked out your samples already earlier, maybe this is a good starting point.
    – iko79
    Jan 24, 2018 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.