DiligentEngine icon indicating copy to clipboard operation
DiligentEngine copied to clipboard

[Windows Ninja Clang/LLVM] Failed to load GetEngineFactoryXXX function from GraphicsEngineXXX_64d.dll library

Open LeSnow-Ye opened this issue 6 months ago • 2 comments

Platform: Windows 11

The whole project is basically the same as Samples/GLFWDemo, but linked to DiligentEngine using add_subdirectory.

A: Using Ninja + Clang/LLVM toolchain:

  • Vulkan: Successfully built. Failed to run:
    • Failed to load GetEngineFactoryVk function from GraphicsEngineVk_64d.dll library
    • at IEngineFactoryVk* pFactoryVk = LoadAndGetEngineFactoryVk();
  • OpenGL: Successfully built. Failed to run:
    • Failed to load GetEngineFactoryOpenGL function from GraphicsEngineOpenGL_64d.dll library
    • at IEngineFactoryOpenGL* pFactoryOpenGL = LoadAndGetEngineFactoryOpenGL();
  • DX11/DX12: Successfully built. Runs well.

B: Using Visual Studio 17 2022 + MSVC:

  • All: Successfully built. Runs well.

Copy GraphicsEngineXXX_64d.dll from B into A: Runs well.

LeSnow-Ye avatar Aug 24 '25 07:08 LeSnow-Ye

So the problem is that when building with clang, DX11/DX12 works well, but Vulkan/OpenGL fails to get the GetEngineFactory* function from the DLL? This is strange, all factories are implemented identically in all backends.

TheMostDiligent avatar Aug 24 '25 15:08 TheMostDiligent

So the problem is that when building with clang, DX11/DX12 works well, but Vulkan/OpenGL fails to get the GetEngineFactory* function from the DLL? This is strange, all factories are implemented identically in all backends.

Yes? I'm new to C++. So I don't know much about what's going on. I just tried these setups. If additional information is needed, please let me know.

LeSnow-Ye avatar Aug 24 '25 15:08 LeSnow-Ye