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

[vulkan-headers] 'PFN_VoidFunction': is not a member of 'vk' when using vulkan.cppm #43519

Open
Blechwolf opened this issue Jan 28, 2025 · 1 comment · May be fixed by #43676
Open

[vulkan-headers] 'PFN_VoidFunction': is not a member of 'vk' when using vulkan.cppm #43519

Blechwolf opened this issue Jan 28, 2025 · 1 comment · May be fixed by #43676
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@Blechwolf
Copy link

Operating system

Windows

Compiler

MSVC

Steps to reproduce the behavior

- Running vcpkg in manifest mode
- including vulkan-headers version 1.4.304.0
- Build a module out of vulkan.cppm using the following CMakeLists.txt:
find_package(VulkanHeaders CONFIG REQUIRED)
find_package(Vulkan REQUIRED)

add_library(VulkanHppModule)
add_library(Vulkan::cppm ALIAS VulkanHppModule)

set_target_properties(VulkanHppModule
   PROPERTIES
     CXX_STANDARD_REQUIRED ON
     CXX_EXTENSIONS OFF
     CXX_MODULE_STD OFF
)

target_compile_definitions(VulkanHppModule
   PRIVATE
      VULKAN_HPP_NO_SMART_HANDLE
      VULKAN_HPP_NO_CONSTRUCTORS
   PUBLIC
      VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=0
)

target_compile_features(VulkanHppModule
   PUBLIC
     cxx_std_20
)
target_include_directories(VulkanHppModule
   PRIVATE
   "${Vulkan_INCLUDE_DIR}"
)
target_link_libraries(VulkanHppModule
   PRIVATE
      Vulkan::Headers
      Vulkan::Vulkan
)
target_sources(VulkanHppModule
   PUBLIC
      FILE_SET cxx_modules TYPE CXX_MODULES 
      BASE_DIRS
         "${Vulkan_INCLUDE_DIR}"
      FILES
         "${Vulkan_INCLUDE_DIR}/vulkan/vulkan.cppm"
)

Failure logs

[build] <...>\build\VS2022\vcpkg_installed\x64-windows\include\vulkan\vulkan.cppm(2701): error C2039: 'PFN_VoidFunction': is not a member of 'vk'
[build] <...>\build\VS2022\vcpkg_installed\x64-windows\include\vulkan\vulkan.cppm(29): note: see declaration of 'vk'
[build] <...>\build\VS2022\vcpkg_installed\x64-windows\include\vulkan\vulkan.cppm(2701): error C2873: 'PFN_VoidFunction': symbol cannot be used in a using-declaration

Additional context

  • Editing vulkan.cppm at line 2701 and commenting the using statement fixes the problem

Image

@Blechwolf Blechwolf added the category:port-bug The issue is with a library, which is something the port should already support label Jan 28, 2025
@MonicaLiu0311
Copy link
Contributor

PS E:\vcpkg> ./vcpkg version
vcpkg package management program version 2025-01-29-a75ad067f470c19f030361064e32a2585392bee2

See LICENSE.txt for license information.

Confirmed, repro locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants