charles-lunarg / vk-bootstrap

Vulkan Bootstrapping Iibrary
MIT License
820 stars 82 forks source link

Inconsistent Linkage for Header Variable with Import vs Include Mechanism #195

Closed nickclark2016 closed 1 year ago

nickclark2016 commented 1 year ago

The variable vkb::detail::QUEUE_INDEX_MAX_VALUE is not explicitly provided a linkage. This leads to a mismatch in linkages if you include vs import the VkBootstrap.h header. Recommend marking inline.

VS 17.4.5 Error

Warning C5260 the constant variable 'vkb::detail::QUEUE_INDEX_MAX_VALUE' has internal linkage in an included header file context, but external linkage in imported header unit context; consider declaring it 'inline' as well if it will be shared across translation units, or 'static' to express intent to use it local to this translation unit graphics \VkBootstrap.h 679

charles-lunarg commented 1 year ago

Inline requires C++17, currently only use C++14 as a base. Though, I'm tempted to move up to C++17 since there isn't much reason to keep on C++14 in the year of 2023.