一些构建发现。

作者: InfantEudora创建于 2026年9月3日更新于 2026年9月5日

Hi. I checked out the master branch and followed the documentation as one would. My platform is Windows 10, MSYS2 MinGW64. I was planning to use OpenGl. I know, it's a very obscure configuration. I ran the appropriate script. That generated a cmake file. I ran that with the default: cmake --build MinGW_Debug That compiles and ultimately stops at: C:\JoltPhysics\Jolt\Compute\DX12\ComputeSystemDX12.cpp:21:10: fatal error: dxcapi.h: No such file or directory I had at this point installed nothing, since there is no mention anywhere that I needed to. No Volkan SDK either. In Jolt.cmake: # Vulkan support if (JPH_USE_VK) find_package(Vulkan) Would set that flag to false. But for DirectX: if (WIN32) # Add natvis file set(JOLT_PHYSICS_SRC_FILES ${JOLT_PHYSICS_SRC_FILES} ${JOLT_PHYSICS_ROOT}/Jolt.natvis) # DirectX support if (JPH_USE_DX12) It just assumes that support for it exists based on the fact that I'm on WIN32. Which it doesn't. I bypassed that by overwriting the flag with: ./cmake_windows_mingw.sh Debug -DJPH_USE_DX12=OFF And now it builds fine. In order to build the Viewer as well, I installed the latest and greatest Vulkan SDK. I ran the build with the DirectX bypass, and now the Samples.exe and JoltViewer.exe get built. I ran them from the MSYS64 console, and they both exit immediately with no console output and just a short white window flash. gdb traced it to: ```(gdb) backtrace #0 __debugbreak () at C:/msys64/mingw64/include/_mingw.h:592 #1 JPH::sVulkanDebugCallback (inSeverity=VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT, inType=1, inCallbackData=0x5fb070, inUserData=0x0) at C:\code\JoltPhysics\Jolt\Compute\VK\ComputeSystemVKImpl.cpp:29 #2 0x00007ffb71e76888 in vulkan-1!vkResetEvent () from C:\WINDOWS\SYSTEM32\vulkan-1.dll Looking at the actual message content that sadly does not make it to the console: ERROR: [Loader Message] Code 0 : loader_add_layer_properties: Multiple 'layer' nodes are deprecated starting in file version "1.0.1". Please use 'layers' : [] array instead in C:\ProgramData\GOG.com\Galaxy\redists\overlay\injected\galaxy_overlay_vklayer_x64.json. Obviously this could be blamed on my increasingly obscure system configuration, but I can imagine other people have old GOG installations lurking around. Fixed it by adding || (inType & VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT) == 0) to the assert in sVulkanDebugCallback. And now it all runs fine.

内容来源: jrouwe/JoltPhysics