![]() Using a tool like Ninja to efficiently build in parallel is usually an easy first step. ![]() So, it seems like I need to get the -experimental:c11atomics flag on the cl.exe command line to progress with my build, but with a couple of hours of Googling around various combinations of the keywords in this post, I can't find where to add this additional command line flag in VS2022.From time to time, people ask me whether it is possible to gain insight into the build performance of a C project. c Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Buffer.c IZ:\repos\git\\vcpkg\installed\圆4-windows\include ^ IZ:\repos\git\\vcpkg\installed\圆4-windows\include\SDL2 ^ Foexamples\main\CMakeFiles\main.dir\VK2D\Buffer.c.obj ^ I tried to confirm this by going to the repo root and running the following command (note the first two flags, the first of which was being correctly passed by ninja when kicking off the build from VS2022): cl.exe ^ So, my naive guess on this is that there's something wrong with how the c11 (or c11 atomics?) support flag is being passed down the build toolchain from VS2022 -> cmake -> ninja -> cl.exe correctly so that cl.exe is not able to parse the source (which is using c11 atomics). Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c(221): error C2198: 'vkDestroyImageView': too few arguments for call Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c(221): warning C4133: 'function': incompatible types - from 'VkImageView' to 'VkDevice' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c(221): error C2037: left of 'dev' specifies undefined struct/union 'VK2DLogicalDevice_t' ![]() Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c(136): error C2198: 'vkCreateImageView': too few arguments for call Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c(136): warning C4024: 'vkCreateImageView': different types for formal and actual parameter 3 Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c(136): warning C4047: 'function': 'const VkAllocationCallbacks *' differs in levels of indirection from 'VkImageView *' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c(136): warning C4133: 'function': incompatible types - from 'VkImageViewCreateInfo *' to 'VkDevice' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c(136): error C2037: left of 'dev' specifies undefined struct/union 'VK2DLogicalDevice_t' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Opaque.h(44): error C2059: syntax error: '}' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Opaque.h(42): error C2059: syntax error: ' ' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Opaque.h(42): error C2061: syntax error: identifier 'doneLoading' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Opaque.h(41): error C2059: syntax error: ' ' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Opaque.h(41): error C2061: syntax error: identifier 'loads' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Opaque.h(40): error C2059: syntax error: ' ' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Opaque.h(40): error C2061: syntax error: identifier 'quitThread' Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Opaque.h(36): error C2061: syntax error: identifier '_Atomic' IZ:\Vulkan\Vulkan-1.3.243.0\Include -external:IZ:\repos\git\\vcpkg\installed\圆4-windows\include\SDL2 -external:IZ:\repos\git\\vcpkg\installed\圆4-windows\include -external:W0 /DWIN32 /D_WINDOWS /Zi /Ob0 /Od /RTC1 -MDd -std:c11 /showIncludes /Foexamples\main\CMakeFiles\main.dir\_\_\VK2D\Image.c.obj /Fdexamples\main\CMakeFiles\main.dir\ /FS -c Z:\repos\git\\PaoloMazzon\Vulkan2D\VK2D\Image.c ![]() Building C object examples\main\CMakeFiles\main.dir\_\_\VK2D\Image.c.objįAILED: examples/main/CMakeFiles/main.dir/_/_/VK2D/Image.c.objĬ:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1435~1.322\bin\Host圆4\圆4\cl.exe /nologo -IZ:\repos\git\\PaoloMazzon\Vulkan2D\examples\main\.\. ![]() Opening the V2D repo in VS2022 and configuring the cmake project works fine, but trying to kick off build of the most basic tutorial ( Vulkan2D/examples/main), fails immediately and spectacularly on a bunch of the c files in the VK2D/ directory with errors like these: >- Build started: Project: CMakeLists, Configuration: Debug. Context: I'm trying to build the samples in the Vulkan2D repo using the latest version of Visual Studio. ![]()
0 Comments
Leave a Reply. |