Ralph Versteegen wrote:
2009/12/23 Jay Tennant <[email protected]>:
From: Ralph Versteegen <[email protected]>
Sent: Tuesday, December 22, 2009 10:35 PM
2009/12/23 James Paige <[email protected]>:
I was just testing out a windows build with gfx_directx gfx_sdl on a
computer with directx 9.0c installed (according to dxdiag). When I run
game.exe it says:

"This application has failed to start because d3dx9_41.dll was not
found. Re-installing the application may fix this problem."

When I click okay on it, then game.exe starts up okay falling back on
gfx_sdl

Any idea why this might happen?

---
James Paige
d3dx9_41.dll is one of many dll's that microsoft has released to patch the d3dx 
library. A solution to this would be obtaining the latest dx runtime on your 
computer, available at:
http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en

An alternative would be compiling the backend with static linking the d3dx 
library, which was available in the december 2004 dx sdk. This will remove 
dependencies, but will increase the dll size by about 500kb.

That's interesting, I was under the impression that loading
gfx_directx.dll would silently fail if its dependencies weren't
available. Luckily, it's quite simple to check in backends.bas whether
d3dx9_41.dll (the august 2009, I think, release of the Direct3D 9
utility library) is present before attempting to load gfx_direct.dll,
and I was originally planning to do.
It's present in March 2009. I was trying to manually remove all dependencies, 
but got stuck with the screenshot and font algorithms.

I'll upload a version of gfx_directx that has no dependencies in a few minutes, 
though 500kb larger.

We ought to have some way to detect whether or not the dll has been
statically linked to d3dx9 or not. Would it be possible to set the
version number (the one seen in a the file browser) and read it
somehow?

I haven't looked at this backend at all, so I don't know if this is already done, but the standard way of doing this (on Windows, at least) is something like this:

hModule = DyLibLoad("gfx_directx.dll")
hFunction = DyLibSymbol(hModule, "some_function_that_exists_in_d3dx9_41_dll")

if hFunction != 0 then
  'd3dx9_41.dll is statically linked
end if

DyLibFree(hModule)

--
Mike
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to