Wintermute Engine Forum

Wintermute Engine => Technical forum => WME sources discussion => Topic started by: Banky on February 21, 2009, 02:23:45 AM

Title: Can't compile
Post by: Banky on February 21, 2009, 02:23:45 AM
I have installed the Directx 9 DSK, and when I'm trying to compile I'm getting a error. The compiler cannot found the file dxerr8.h. Do I have to install the DirectX 8 SDK to compile? If the answer is yes, where can I download the DirectX 8 SDK? I can not find it.

Thanks in advance.
Banky
Title: Re: Can't compile
Post by: Mnemonic on February 22, 2009, 10:31:41 AM
I don't know when exactly Microsoft removed the file from SDK, but basically you can remove the reference, then you'll get a compile error because of missing DXGetErrorString8 function, which you can remove as well. It's not vital, it just translates DX error codes to human readable strings in the log file.

Or get an older SDK which still included the file.
Title: Re: Can't compile
Post by: Mnemonic on February 22, 2009, 10:39:07 AM
And looking at the current SDK, it should work by removing the "8" from all the names. There is now a generic DXGetErrorString function, which handles all DX8/DX9/DX10.
Title: Re: Can't compile
Post by: Banky on February 22, 2009, 05:49:31 PM
It works perfectly now   :)

Thanks, Mnemonic
Title: Re: Can't compile
Post by: Nebz on March 05, 2009, 08:36:46 PM
I ran into the same problem when trying to compile. After removing the "8" from the .h names I still get compile errors:

error C2065: 'WS_EX_LAYOUTRTL' : undeclared identifier ...\src\engine_core\wme_base\WinDialog.cpp 80 wme_base
error C2065: 'MONITOR_DEFAULTTONEAREST' : undeclared identifier   ...\src\engine_core\wme_base\HWManager.cpp   1062   wme_base
error C3861: 'MonitorFromWindow': identifier not found   ...\src\engine_core\wme_base\HWManager.cpp   1062   wme_base
error C3861: 'EnumDisplayMonitors': identifier not found   ...\src\engine_core\wme_base\HWManager.cpp   1129   wme_base
error C2065: 'SHGFP_TYPE_CURRENT' : undeclared identifier ...\src\engine_core\wme_base\BGameExHelper.cpp   320   wme_base
fatal error LNK1181: cannot open input file '..\..\lib\wme_base_d3d9.lib'   wme   wme

I have DirectX SDK (November 2008) and DirectX 9.0, and use Visual Studio 2008 to compile. Any idea what I'm missing?

Title: Re: Can't compile
Post by: Mnemonic on March 05, 2009, 09:51:52 PM
Open the file 'PlatformWin.h'. At the top of the file change:

#define _WIN32_WINNT 0x0400

to

#define _WIN32_WINNT 0x0500

That should do the trick.
Title: Re: Can't compile
Post by: Nebz on March 06, 2009, 01:22:11 PM
That did get rid of all those errors, many thanks! It did however make way for a new error:

fatal error LNK1104: cannot open file 'dinput.lib'   wme   wme

I hope that's the last of them.  :-[
Title: Re: Can't compile
Post by: Mnemonic on March 06, 2009, 07:02:32 PM
*sigh* It seems Microsoft removed the file from the SDK at some point. I don't know what to suggest here, either get an older SDK, or download the file somewhere and put it to the SDK\lib directory, or if you're up for the task, you can actually remove all DirectInput references from WME. It's not really used, I should have removed it long time ago.
Title: Re: Can't compile
Post by: Nebz on March 06, 2009, 08:42:33 PM
Alright, I'll choose one of the above. Many many thanks for all of your help Mnemonic!  :)
Title: Re: Can't compile
Post by: piere on July 05, 2011, 10:52:40 AM
I downloaded the DirectX 8 SDK but where do I install it to so the WME project will recognize it? I keep getting the Error   1   fatal error C1083: Cannot open include file: 'd3d8.h': No such file or directory
Title: Re: Can't compile
Post by: Mnemonic on July 07, 2011, 08:39:30 AM
The DirectX SDK should add itself to the paths in Visual Studio during installation. But since the 8.0 SDK is rather old and you are probably using some new version of Visual Studio (you didn't say which), you may need to add the paths manually.
Title: Re: Can't compile
Post by: piere on July 07, 2011, 08:57:08 AM
I am using Visual Studio 2008 Professional
Title: Re: Can't compile
Post by: Mnemonic on July 07, 2011, 09:28:13 AM
See "How to set the C++ Directories manually" here: http://blogs.msdn.com/b/windowssdk/archive/2009/10/16/development-with-windows-sdk-directx-sdk-when-visual-studio-2008-is-installed.aspx