narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
925 stars 70 forks source link

Can't compile. d3dumddi.h missing in latest versions of Windows SDK #57

Closed Rule110 closed 4 years ago

Rule110 commented 4 years ago

Hi narzoul,

I can't compile your source code because the d3dumddi.h header file is missing from the latest versions of the Windows 10 SDK.

I think it was removed back in v10.0.14393. The latest versions of the SDK in Visual Studio 2019 don't seem to have this header file. v10.0.17763 is missing it.

How can one go about compiling your source now? Should I switch back to an older Visual Studio, or is there a quick fix I'm missing?

Regards, Rory

narzoul commented 4 years ago

It might be part of the WDK, not the SDK. Try installing the corresponding Windows Driver Kit also. https://docs.microsoft.com/en-us/windows-hardware/drivers/other-wdk-downloads I think you need "WDK for Windows 10, version 1809" from this page.

Rule110 commented 4 years ago

Hi narzoul,

Thanks for the help. It compiles now. For anyone else wondering I downloaded the latest WDK (version 1903) from here: https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk

The problem now is that my dll when compiled is 10 times the size of your dll (the one that comes with Tiberian Sun). The game also is laggy and slow when I use my compiled version.

Do you know what could be causing my compile size to be so large and for the game to run so slow with it?

Regards, Rory

narzoul commented 4 years ago

Sounds like you're compiling the debug build. Is your ddraw.log file also larger than 1-2 kbytes? If yes, then definitely that is the problem. You can change the build type from the drop-down menu at the top of the Visual Studio window (that should have "Debug" selected now).

Note that each build type's dll goes into a separate directory, which is named the same way as the build type.

narzoul commented 4 years ago

By the way, the latest commit is usually already built and released under the Code/Releases page here on GitHub (it's the "experimental" version), so you don't need to build it yourself unless you also want to modify the code or build from an older commit.

noabody commented 3 years ago

I was curious as to the the easiest way to build this project from source and it seems to be by using the Microsoft EWDK which can be natively mounted in Windows 10.

Navigate to that location and double-click LaunchBuildEnv.cmd

Use build command:

msbuild /p:WindowsTargetPlatformVersion=%Version_Number%;Platform=x86;Configuration=Release /t:Clean,Build DDrawCompat.sln
AliaskaRuS commented 1 year ago

d3dumddi.zip