I'm trying to build an old application using a Windows XP Professional SP3 virtual machine. I set the environment with mingw and all is ok except for this error during building process:
error: 'struct _DDSURFACEDESC2' has no member named 'DUMMYUNIONNAMEN'
Seems that the ddraw.h header coming from mingw has a different structure. I tried to remove the DUMMYUNIONNAMEN from the source code like this:
// desc is passed as argument, initialized elsewhere
// desc type --> LPDDSURFACEDESC2
int depth = desc->DUMMYUNIONNAMEN(4).ddpfPixelFormat.DUMMYUNIONNAMEN(1).dwRGBBitCount;
that I replaced with this:
int depth = desc->ddpfPixelFormat.dwRGBBitCount;
In this way it builds but when I run the application I got sometimes an ACCESS VIOLATION error and sometimes (with different input file) no video (black window, only audio)
CodePudding user response:
Using ddraw.h from dx9sdk resolved the problem of DUMMYUNIONNAMEN. For the segmentation fault I opened another question