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

Build in CLion and get “error: conversion from 'shared_ptr<vk::ResultValue<vk::Pipeline>>' to non-scalar type 'shared_ptr<vk::Pipeline>' requested” #1

Open
yuxiao-ash opened this issue Feb 24, 2022 · 0 comments

Comments

@yuxiao-ash
Copy link

I clone your project and build it, but I got error showed as below.

Scanning dependencies of target vulkan_example
[ 50%] Building CXX object CMakeFiles/vulkan_example.dir/vulkan_example.cpp.obj
D:\Projects\vulkans\vulkan_offscreen_renderer\vulkan_example.cpp: In function 'int main(int, char**)':
D:\Projects\vulkans\vulkan_offscreen_renderer\vulkan_example.cpp:724:50: error: conversion from 'shared_ptr<vk::ResultValuevk::Pipeline>' to non-scalar type 'shared_ptrvk::Pipeline' requested
vkx::pipeline pipeline = vkx::make_handle(
~~~~~~~~~~~~~~~~^
device->createGraphicsPipeline(vk::PipelineCache(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
graphics_pipeline_create_info),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[device](auto p) { device->destroyPipeline(p); });
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Projects\vulkans\vulkan_offscreen_renderer\vulkan_example.cpp: In instantiation of 'main(int, char**)::<lambda(auto:23)> [with auto:23 = vk::ResultValuevk::Pipeline]':
D:\Projects\vulkans\vulkan_offscreen_renderer\vulkan_example.cpp:24:16: required from 'vkx::handle vkx::make_handle(const T&, Deleter) [with T = vk::ResultValuevk::Pipeline; Deleter = main(int, char**)::<lambda(auto:23)>; vkx::handle = std::shared_ptr<vk::ResultValuevk::Pipeline >]'
D:\Projects\vulkans\vulkan_offscreen_renderer\vulkan_example.cpp:727:61: required from here
D:\Projects\vulkans\vulkan_offscreen_renderer\vulkan_example.cpp:727:32: warning: 'vk::ResultValue::operator T&() & [with T = vk::Pipeline]' is deprecated: Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue. [-Wdeprecated-declarations]
[device](auto p) { device->destroyPipeline(p); });
^~~~~~
In file included from D:\Projects\vulkans\vulkan_offscreen_renderer\vulkan_example.cpp:8:
D:/software/VulkanSDK/1.2.198.1/Include/vulkan/vulkan.hpp:6395:5: note: declared here
operator T &() & VULKAN_HPP_NOEXCEPT
^~~~~~~~
mingw32-make.exe[3]: *** [CMakeFiles\vulkan_example.dir\build.make:72: CMakeFiles/vulkan_example.dir/vulkan_example.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:82: CMakeFiles/vulkan_example.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:89: CMakeFiles/vulkan_example.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:168: vulkan_example] Error 2

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

1 participant