[SOLVED] Ogre-Next samples on Windows won't load D3D11 DLL Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
jwwalker
Goblin
Posts: 224
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 17
Contact:

[SOLVED] Ogre-Next samples on Windows won't load D3D11 DLL

Post by jwwalker »

Ogre Version: 2.2.3
Operating System: Windows 10
Render System: Direct3D11

I downloaded and built Ogre-next and its dependencies using the recommended batch file, build_ogre_Visual_Studio_16_2019_x64.bat. And it all got built, but when I try to run any of the sample programs, they show an error saying they can't load RenderSystem_Direct3D11_d.dll. So I opened up the Visual Studio project and tried running Sample_Tutorial01_Initialization under the debugger. In the debugger log, I see:

Code: Select all

Ogre: Loading library .\RenderSystem_Direct3D11_d
'Sample_Tutorial01_Initialization.exe' (Win32): Loaded 'D:\MoreCode\Ogre\ogre-next\build\bin\debug\RenderSystem_Direct3D11_d.dll'. Symbols loaded.
'Sample_Tutorial01_Initialization.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'. 
'Sample_Tutorial01_Initialization.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. 
'Sample_Tutorial01_Initialization.exe' (Win32): Loaded 'C:\Windows\System32\D3DCompiler_47.dll'. 
'Sample_Tutorial01_Initialization.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'. 
'Sample_Tutorial01_Initialization.exe' (Win32): Unloaded 'C:\Windows\System32\d3d11.dll'
'Sample_Tutorial01_Initialization.exe' (Win32): Unloaded 'C:\Windows\System32\dxgi.dll'
'Sample_Tutorial01_Initialization.exe' (Win32): Unloaded 'C:\Windows\System32\cryptsp.dll'
'Sample_Tutorial01_Initialization.exe' (Win32): Unloaded 'C:\Windows\System32\D3DCompiler_47.dll'
'Sample_Tutorial01_Initialization.exe' (Win32): Unloaded 'D:\MoreCode\Ogre\ogre-next\build\bin\debug\RenderSystem_Direct3D11_d.dll'
I guess that means that it found the DLL and started loading it, but gave up for some reason. But why?
Last edited by jwwalker on Wed Sep 22, 2021 4:51 pm, edited 1 time in total.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Ogre-Next samples on Windows won't load D3D11 DLL

Post by dark_sylinc »

The most likely culprit amd_ags_x64.dll didn't get copied to the same folder as the samples for some reason, thus D3D11 DLL can't load it and gives up.

Find the file manually (it should be in the dependencies) and copy it to the bin folder
jwwalker
Goblin
Posts: 224
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 17
Contact:

Re: Ogre-Next samples on Windows won't load D3D11 DLL

Post by jwwalker »

Yes, that did it! The samples now run. The only thing is I can't figure out the right way to make them stop, other than using ctrl-alt-delete and End Task.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Ogre-Next samples on Windows won't load D3D11 DLL

Post by dark_sylinc »

Hi!

Alt+F4 will work
Post Reply