Replies: 1 comment
-
Can you elaborate? I build with that exact same config (Wincows, VS2022) almost daily. We also do not use vcpkg, so not sure how disabling any options for that could change anything. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Vulkan-Samples project will not build on Windows without following these steps.
Therefore, when building the project, type redefinition errors occur:
cmake -G "Visual Studio 17 2022" -A x64 -S . -B build/windows
cmake --build build/windows --config Release --target vulkan_samples
F:\Work\Vulkan-Samples\third_party\ktx\lib\stream.h(49,6): error C2011: 'streamType': 'enum' type redefinition [F:\Work\Vulkan-Samples\build\windows\third_party\ktx.vcxproj]
(compiling source file '../../../third_party/ktx/lib/checkheader.c')
C:\vcpkg\installed\x64-windows\include\ktx.h(822,6):
see declaration of 'streamType'
F:\Work\Vulkan-Samples\third_party\ktx\lib\stream.h(108,8): error C2011: 'ktxStream': 'struct' type redefinition [F:\Work\Vulkan-Samples\build\windows\third_party\ktx.vcxproj]
(compiling source file '../../../third_party/ktx/lib/checkheader.c')
C:\vcpkg\installed\x64-windows\include\ktx.h(878,8):
see declaration of 'ktxStream'
etc. similar errors.
Ok, let's disable vcpkg manually:
Project -> Properties -> vcpkg -> General -> Use Vcpkg -> No
Type redefinition errors are gone.
Request to developers to provide for the presence of vcpkg in the system.
However, the project uses min/max implementations in STL.
This results in the following errors:
Error C2589 '(': illegal token on right side of '::' plugins F:\Work\Vulkan-Samples\third_party\vulkan\include\vulkan\vulkan.hpp 196
Error C2760 syntax error: ')' was unexpected here; expected ';' plugins F:\Work\Vulkan-Samples\third_party\vulkan\include\vulkan\vulkan.hpp 196
Error C3878 syntax error: unexpected token ')' following 'expression_statement' plugins F:\Work\Vulkan-Samples\third_party\vulkan\include\vulkan\vulkan.hpp 196
etc. similar errors.
Ok, let's disable min/max macros manually:
Project -> Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions -> <Edit...> -> NOMINMAX
Errors related to min/max macros have disappeared.
Request to developers to disable min/max macros in project configuration.
However, such functions are used in the project.
This results in the following errors:
Error C4996 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. plugins F:\Work\Vulkan-Samples\app\plugins\screenshot\screenshot.cpp 74
Error C4996 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. swapchain_recreation F:\Work\Vulkan-Samples\samples\api\swapchain_recreation\swapchain_recreation.cpp 895
Ok, we manually enable these STL functions:
Project -> Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions -> <Edit...> -> _CRT_SECURE_NO_WARNINGS
Errors related to disabling part of STL have disappeared.
Request to developers to enable STL completely in project configuration.
Error C7595 'fmt::v10::basic_format_string<char,float>::basic_format_string': call to immediate function is not a constant expression framework F:\Work\Vulkan-Samples\framework\gui.cpp 925
etc. similar errors.
The source of the problem is in the header:
F:\Work\Vulkan-Samples\third_party\fmt\include\fmt\core.h
template <typename Char, typename... Args>
class basic_format_string
{
.......
template <typename S,
FMT_ENABLE_IF(std::is_convertible<const S&, basic_string_view>::value)>
FMT_CONSTEVAL FMT_INLINE basic_format_string(const S& s) : str_(s)
^^^^^^^^^^^^^
{.......}
.......
};
Installing the latest Visual Studio 17 2022 did not help.
Switching the compiler to the latest edition of the C++ standard did not help:
Project -> Properties -> Configuration Properties -> General -> General Properties -> C++ Language Standard -> Preview - Features from the Latest C++ Working Draft (/std:c++latest)
There may be a Visual Studio 17 2022 compiler error here.
Perhaps the error here is natural and fully consistent with the latest edition of the C++ standard.
We are not theorists, but practitioners, therefore we accept Solomon’s decision:
Ok, let's remove the consteval keyword from the definition of the basic_format_string class constructor.
Errors related to consteval keyword have disappeared.
Request to developers to provide using the Visual Studio 17 2022 compiler, for example:
#ifndef _MSC_VER
consteval
#endif
Error LNK1248 image size (1009BC467) exceeds maximum allowable size (FFFFFFFF) apps F:\Work\Vulkan-Samples\build\windows\app\apps\lib\AMD64\Release\apps.lib 1
Here the maximum size of the static library apps.lib of the subproject apps is exceeded.
Let's analyze the composition of the static library apps.lib.
Note that the Object Libraries include object modules from other subprojects, in particular the framework subproject.
Ok, let's remove the object modules of the framework subproject from the apps subproject.
We redirect the output directory of the framework subproject to the same model as the apps subproject:
Project -> Properties -> Configuration Properties -> General -> General Properties -> Output Directory
-> .\lib\release\AMD64\
Add the static library framework.lib to the vulkan_samples subproject:
Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies ->
..\framework\lib\release\AMD64\framework.lib
Errors related to apps.lib have disappeared.
Request to developers to include the static library framework.lib in the vulkan_samples subproject.
Error C4703 potentially uninitialized local pointer variable 'astc_context' used vulkan_samples
F:\Work\Vulkan-Samples\framework\scene_graph\components\image\astc.cpp 149
Ok, let's initialize the astc_context pointer with the nullptr value.
The error related to the astc_context pointer has disappeared.
Request to developers to initialize the astc_context pointer in the vulkan_samples subproject.
Let's test the examples for functionality:
vulkan_samples sample compute_nbody - Success
vulkan_samples sample dynamic_uniform_buffers - Success
vulkan_samples sample hdr - Success
vulkan_samples sample hello_triangle - Success
vulkan_samples sample hlsl_shaders - Success
vulkan_samples sample hpp_compute_nbody - Success
vulkan_samples sample hpp_dynamic_uniform_buffers - Success
vulkan_samples sample hpp_hdr - Success
vulkan_samples sample hpp_hello_triangle - Success
vulkan_samples sample hpp_hlsl_shaders - Success
vulkan_samples sample hpp_instancing - Success
vulkan_samples sample hpp_oit_depth_peeling - Success
vulkan_samples sample hpp_oit_linked_lists - Success
vulkan_samples sample hpp_separate_image_sampler - Success
vulkan_samples sample hpp_terrain_tessellation - Success
vulkan_samples sample hpp_texture_loading - Success
vulkan_samples sample hpp_texture_mipmap_generation - Success
vulkan_samples sample hpp_timestamp_queries - Success
vulkan_samples sample instancing - Success
vulkan_samples sample oit_depth_peeling - Success
vulkan_samples sample oit_linked_lists - Success
vulkan_samples sample separate_image_sampler - Success
vulkan_samples sample swapchain_recreation - Success
vulkan_samples sample terrain_tessellation - Success
vulkan_samples sample texture_loading - Success
vulkan_samples sample texture_mipmap_generation - Success
vulkan_samples sample timestamp_queries - Success
vulkan_samples sample buffer_device_address - Success
vulkan_samples sample calibrated_timestamps - Success
vulkan_samples sample color_write_enable - Success
vulkan_samples sample conditional_rendering - Success
vulkan_samples sample conservative_rasterization - Success
vulkan_samples sample debug_utils - Success
vulkan_samples sample descriptor_buffer_basic - Success
vulkan_samples sample descriptor_indexing - Success
vulkan_samples sample dynamic_blending - Success
vulkan_samples sample dynamic_line_rasterization - Success
vulkan_samples sample dynamic_primitive_clipping - Success
vulkan_samples sample dynamic_rendering - Success
vulkan_samples sample extended_dynamic_state2 - Success
vulkan_samples sample fragment_shader_barycentric - Success
vulkan_samples sample fragment_shading_rate - Success
vulkan_samples sample fragment_shading_rate_dynamic - Success
vulkan_samples sample full_screen_exclusive - Success
vulkan_samples sample graphics_pipeline_library - Success
vulkan_samples sample gshader_to_mshader - Success
vulkan_samples sample hpp_mesh_shading - Success
vulkan_samples sample logic_op_dynamic_state - Success
vulkan_samples sample memory_budget - Success
vulkan_samples sample mesh_shader_culling - Success
vulkan_samples sample mesh_shading - Success
vulkan_samples sample open_cl_interop - Success
vulkan_samples sample open_gl_interop - Success
vulkan_samples sample patch_control_points - Success
vulkan_samples sample portability - Success
vulkan_samples sample push_descriptors - Success
vulkan_samples sample ray_queries - Success
vulkan_samples sample ray_tracing_basic - Success
vulkan_samples sample ray_tracing_extended - Success
vulkan_samples sample ray_tracing_position_fetch - FAIL
vulkan_samples sample ray_tracing_reflection - Success
vulkan_samples sample shader_debugprintf - Success
vulkan_samples sample shader_object - Success
vulkan_samples sample sparse_image - Success
vulkan_samples sample synchronization_2 - Success
vulkan_samples sample vertex_dynamic_state - Success
vulkan_samples sample mobile_nerf - Success
vulkan_samples sample 16bit_arithmetic - Success
vulkan_samples sample 16bit_storage_input_output - Success
vulkan_samples sample afbc - Success
vulkan_samples sample async_compute - Success
vulkan_samples sample command_buffer_usage - Success
vulkan_samples sample constant_data - Success
vulkan_samples sample descriptor_management - Success
vulkan_samples sample hpp_pipeline_cache - Success
vulkan_samples sample hpp_swapchain_images - Success
vulkan_samples sample hpp_texture_compression_comparison - Success
vulkan_samples sample image_compression_control - Success
vulkan_samples sample layout_transitions - Success
vulkan_samples sample msaa - Success
vulkan_samples sample multi_draw_indirect - Success
vulkan_samples sample multithreading_render_passes - Success
vulkan_samples sample pipeline_barriers - Success
vulkan_samples sample pipeline_cache - Success
vulkan_samples sample render_passes - Success
vulkan_samples sample specialization_constants - Success
vulkan_samples sample subpasses - Success
vulkan_samples sample surface_rotation - Success
vulkan_samples sample swapchain_images - Success
vulkan_samples sample texture_compression_basisu - Success
vulkan_samples sample texture_compression_comparison - Success
vulkan_samples sample wait_idle - Success
vulkan_samples sample profiles - Success
Request to developers to fix subproject ray_tracing_position_fetch.
Beta Was this translation helpful? Give feedback.
All reactions