简体   繁体   中英

linking error cxx: cannot find -lvulkan

When I tried to compile example from Anvil framework for Vulkan I get following errors:

[ 97%] Linking CXX executable OutOfOrderRasterization /usr/bin/ld: cannot find -lvulkan collect2: error: ld returned 1 exit status CMakeFiles/OutOfOrderRasterization.dir/build.make:126: recipe for target 'OutOfOrderRasterization' failed make[2]: *** [OutOfOrderRasterization] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/OutOfOrderRasterization.dir/all' failed make[1]: *** [CMakeFiles/OutOfOrderRasterization.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

How i need to configure Vulkan to resolve it? (Ubuntu)

Check you LIBRARY paths. You might need to download and install vulkan. There should a .so file in one your library paths( /usr/lib{,64} , /lib{,64} , /usr/share/lib{,64} ) named to the effect of libvulkan.numbers.so.

See this ask ubuntu question: https://askubuntu.com/questions/796442/ld-cannot-find-lvulkan

CMake versions 3.7 and later ship with a FindVulkan.cmake module that finds the Vulkan includes and library for you if you have a Vulkan SDK installed and the VULKAN_SDK environment variable set. The CMake module also finds the includes and library if you have installed a Vulkan package to your system directories. The Getting Started guide on the LunarXchange website has some additional detail.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM