Wintermute Engine Forum
Wintermute Engine => Technical forum => WME sources discussion => Topic started 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
-
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.
-
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.
-
It works perfectly now :)
Thanks, Mnemonic
-
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?
-
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.
-
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. :-[
-
*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.
-
Alright, I'll choose one of the above. Many many thanks for all of your help Mnemonic! :)
-
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
-
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.
-
I am using Visual Studio 2008 Professional
-
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