With Flex, we tried to "convert" php5ts.dll from official PHP binaries to MinGW. We used the following method, that I now remember (more or less) :
- replaced all needed DLL of Raydium's "bin" directory with the ones of the binary package of php.net
- we've generated a .def file from the DLL, using "pexports php5ts.dll > a.def"
- then, generated .lib file from the DLL, using "dlltool -C -d a.def -l libphp5ts.a"
For all this commands, you need to have a PATH that includes the "bin" directory of MinGW, otherwise pexports/dlltool will work weirdly.
- We had to "convert" PHP sources (the correct word is "butcher") to create an "include" for this new PHP version. Remove some typdef, some includes, ... Most of the work is to remove all the Visual Studio specific things.
And we were then able to compile raydium.dll without any error/warning !
But applications just do load: we've a crash during Raydium initialisation (before any PHP init, it seems).
I was unable to debug using gdb (how does it works with the SDK ? I added "-g" flag to compilation, but gdb still complains about missing debugging symbols), but I've found an interesting clue:
The crash also occurs when I replace only the php5ts.dll from a vanilla SDK with any official php5ts.dll coming from any version superior or equal to php-5.2.1 ! The results should be some missing symbols, not a crash ! Something seems to have changed in this release, and the changelog shows nothing special.
Debugging would help. Here it is my current trace of the crash:
Code:
(gdb) run
Starting program: C:\data\raydium_bordel\raydium_win32_sdk_748\bin/cam.exe
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
warning: Lowest section in C:\WINDOWS\system32\odbcint.dll is .rsrc at 1f841000
Raydium: Raydium 3D Game Engine
Raydium: version 0.800
Raydium: command line args: OK
Raydium: chdir to 'C:\data\raydium_bordel\raydium_win32_sdk_748\bin/': OK
Raydium: using 'C:\Documents and Settings\Xfennec/.raydium' as home dir
Raydium: Requesting 640x480:32 mode
Raydium: Found 640x480 with 32 bpp color and 24 bits zbuffer (stencil is 8)
Raydium: using GeForce 9600 GT/PCI/SSE2, from NVIDIA Corporation (version 3.0.0)
Raydium: Signal Handlers: OK
Raydium: OpenGL extensions: OK
Raydium: Platform "4xfloat" vector size is: 16 byte(s) long
Raydium: OpenGL implementation maximum texture size: 8192x8192
Raydium: OpenGL hardware providing 4 texture unit(s), Raydium deals with 4
Program received signal SIGSEGV, Segmentation fault.
0x7c91100b in ntdll!RtlEnumerateGenericTableLikeADirectory ()
from C:\WINDOWS\system32\ntdll.dll
(gdb)
PS: The odbcint.dll warning is still here with working php5ts DLLs (just tested with 5.2.0).