Cannot find D3DX9.h - Building on Win7

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bryanchicken Offline
Posts: 68
Joined: Apr 2006
Reputation: 0
Post: #1
i've cloned the xbmc-pvr repository and i'm trying to set my system up to build so i can apply a patch.

I've got the source files from git.

I'm following this wiki page:
In the section 'Setting up the build environment' everything works up until BuildSetup.bat.
Running that i get the blue command prompt window with 'Cleaning Solution...' and then 'Compiling XBMC...'.

After a while i get an error "XBMC.exe failed to build!".
The details are below:

Build started 09/11/2011 10:27:30.
     1>Project "C:\xbmc\xbmc\project\VS2010Express\XBMC.vcxproj" on node 2 (build target(s)).
         Touching "XBMC\Release (DirectX)\objs\XBMC.unsuccessfulbuild".
         Performing Custom Build Tools
                 1 file(s) copied.
         FC: cannot open ..\..\XBMC\WIN32\GIT_REV.H - No such file or folder
                 1 file(s) copied.
         C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I..\..\ /I..\..\xbmc\ /I..\..\xbmc\win32\ /I..\..\xbmc\cores\dvdplayer /I..\..\lib /I..\..\lib\ffmpeg /I"..\..\lib\ffmpeg\include-xbmc-win32" /I..\..\lib\liblame\include /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaRenderer /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaConnect /I..\..\lib\libUPnP\Platinum\Source\Devices\MediaServer /I..\..\lib\libUPnP\Platinum\Source\Platinum /I..\..\lib\libUPnP\Platinum\Source\Core /I..\..\lib\libUPnP\Neptune\Source\Core /I..\..\lib\libUPnP\Neptune\Source\System\Win32 /I..\..\lib\win32\pcre /I..\..\lib\win32 /Zi /nologo /W3 /WX- /MP /Ox /Ot /Oy /D TARGET_WINDOWS /D _WINDOWS /D _MSVC /D WIN32 /D NDEBUG /D _WIN32_WINNT=0x0501 /D NTDDI_VERSION=0x05010300 /D NOMINMAX /D _USE_32BIT_TIME_T /D HAS_DX /D __STDC_CONSTANT_MACROS /D _VC80_UPGRADE=0x0710 /D _MBCS /GF- /Gm- /EHa /MT /GS /Gy- /arch:SSE /fp:precise /Zc:wchar_t /Zc:forScope /Yc"pch.h" /Fp"XBMC\Release (DirectX)\objs\XBMC.pch" /Fo"XBMC\Release (DirectX)\objs\\" /Fd"XBMC\Release (DirectX)\objs\vc100.pdb" /Gd /TP /wd4996 /FIpch.h /analyze- /errorReport:prompt ..\..\xbmc\win32\pch.cpp /MP
     1>c:\xbmc\xbmc\xbmc\win32\pch.h(20): fatal error C1083: Cannot open include file: 'D3DX9.h': No such file or directory
     1>Done Building Project "C:\xbmc\xbmc\project\VS2010Express\XBMC.vcxproj" (build target(s)) -- FAILED.


Time Elapsed 00:00:10.33

Have i done something wrong?
I've tried running the extract_git_rev.bat file to get rid of the first error but didn't have any luck.

I've also tried following the visual studio instructions and i get something similar (only end of which is shown below due to post length). I'm sure this is probably something i've missed, can someone help me please?


34>libmp3lame.exp : warning LNK4070: /OUT:lame_enc.DLL directive in .EXP differs from output filename 'C:\xbmc\xbmc\project\VS2010Express\libs\libmp3lame_dll\ReleaseNASM\libmp3lame.d​ll'; ignoring directive
34>  vc10_libmp3lame_dll.vcxproj -> C:\xbmc\xbmc\project\VS2010Express\libs\libmp3lame_dll\ReleaseNASM\libmp3lame.dl​l
26>  xmemfile.cpp
26>  Generating Code...
34>          1 file(s) copied.
36>  Performing Custom Build Tools
36>  20111108-b499c47
36>          1 file(s) copied.
36>  FC: cannot open ..\..\XBMC\WIN32\GIT_REV.H - No such file or folder
36>          1 file(s) copied.
36>  pch.cpp
26>     Creating library Release\vs2010\cximagecrt.lib and object Release\vs2010\cximagecrt.exp
26>  ImageLib.vcxproj -> C:\xbmc\xbmc\project\VS2010Express\libs\ImageLib_dll\Release\ImageLib.dll
26>          1 file(s) copied.
36>c:\xbmc\xbmc\xbmc\win32\pch.h(20): fatal error C1083: Cannot open include file: 'D3DX9.h': No such file or directory
========== Build: 33 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
find quote
tsp42 Offline
Senior Member
Posts: 222
Joined: Aug 2011
Reputation: 11
Location: Denmark
Post: #2
Did you install the DirectX SDK? D3DX9.h is included in the SDK. Else try opening the project in visual studio and check if the include directory includes the SDK.
find quote
bryanchicken Offline
Posts: 68
Joined: Apr 2006
Reputation: 0
Post: #3

Thanks a lot. I got directx rather than the sdk.
Never done Windows development Blush
find quote