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

error: ‘VK_API_VERSION’ was not declared in this scope #13

Open
OlliC opened this issue Apr 18, 2016 · 4 comments
Open

error: ‘VK_API_VERSION’ was not declared in this scope #13

OlliC opened this issue Apr 18, 2016 · 4 comments

Comments

@OlliC
Copy link

OlliC commented Apr 18, 2016

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

@chrisjhebert1973
Copy link

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

@OlliC
Copy link
Author

OlliC commented Apr 19, 2016

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

@chrisjhebert1973
Copy link

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

@OlliC
Copy link
Author

OlliC commented Apr 19, 2016

That did it. Thank you. Got it working.

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