gl_vk_chopper icon indicating copy to clipboard operation
gl_vk_chopper copied to clipboard

error: ‘VK_API_VERSION’ was not declared in this scope

Open OlliC opened this issue 8 years ago • 4 comments

Hi,

i was trying to build the chopper demo on Arch Linux using Nvidia 364.16 driver. The cmake configuration went ok, but while building with make an error occured.

This was the cmake output:

$ cmake ..
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- -------------------------------
-- Processing Project gl_vk_chopper:
-- BASE_DIRECTORY = /home/olli/Programme/vulkan/gl_vk_chopper/..
-- CMAKE_CURRENT_SOURCE_DIR = /home/olli/Programme/vulkan/gl_vk_chopper
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found OpenGL: /usr/lib64/libGL.so  
-- Found GLEW: /home/olli/Programme/vulkan/shared_sources/glew/include  
-- Could NOT find GLFW (missing:  GLFW_INCLUDE_DIR GLFW_LIBRARY) 
-- found Glew source code. Using it instead of library
-- VulkanSDK search paths: 
-- Vulkan Include : /usr/include
-- Vulkan Library : /lib64/libvulkan.so
-- VulkanSDK version: 
Using system for vulkan sdk. 
-- Found VULKANSDK: /usr/include/include  
-- --> using package VulkanSDK
-- --> using package AntTweakBar
-- Found ANTTWEAKBAR: /usr/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/olli/Programme/vulkan/gl_vk_chopper/build

And this are the last lines of the make output:

/home/olli/Programme/vulkan/gl_vk_chopper/VulkanAppContext.cpp: In member function ‘void VulkanAppContext::initAppContext()’:
/home/olli/Programme/vulkan/gl_vk_chopper/VulkanAppContext.cpp:322:23: error: ‘VK_API_VERSION’ was not declared in this scope
  appInfo.apiVersion = VK_API_VERSION;
                       ^
CMakeFiles/gl_vk_chopper.dir/build.make:734: recipe for target 'CMakeFiles/gl_vk_chopper.dir/VulkanAppContext.cpp.o' failed
make[2]: *** [CMakeFiles/gl_vk_chopper.dir/VulkanAppContext.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gl_vk_chopper.dir/all' failed
make[1]: *** [CMakeFiles/gl_vk_chopper.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

OlliC avatar Apr 18 '16 16:04 OlliC

HI I've just pushed an update that removes the deprecated referrence to VK_API_VERSION. Please can you pull VulkanAppContext.cpp again and try.

Many Thanks

Chris

chrisjhebert1973 avatar Apr 18 '16 17:04 chrisjhebert1973

That solved it. But now i got another error with linking.

[100%] Linking CXX executable /home/olli/Programme/vulkan/bin_x64/gl_vk_chopper
/usr/bin/ld: cannot find -lassimp
collect2: error: ld returned 1 exit status
CMakeFiles/gl_vk_chopper.dir/build.make:932: recipe for target '/home/olli/Programme/vulkan/bin_x64/gl_vk_chopper' failed
make[2]: *** [/home/olli/Programme/vulkan/bin_x64/gl_vk_chopper] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gl_vk_chopper.dir/all' failed
make[1]: *** [CMakeFiles/gl_vk_chopper.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

OlliC avatar Apr 19 '16 11:04 OlliC

Ok, thats strange as it doesn't use assimp. Quick workaround for now is to install assimp (asset importer) sudo apt-get install assimp

chrisjhebert1973 avatar Apr 19 '16 11:04 chrisjhebert1973

That did it. Thank you. Got it working.

OlliC avatar Apr 19 '16 19:04 OlliC