d3dx9.h not found also issue for msvc2010/msvc2012

Minor issues with the Ogre API that can be trivial to fix
jonim8or
Goblin
Posts: 287
Joined: Mon Dec 08, 2008 4:49 pm
x 10

d3dx9.h not found also issue for msvc2010/msvc2012

Post by jonim8or »

Compiling with OGRE_Static using msvc2012 I get a fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory for the samplebrowser. It is also mentioned in the bug Sample browser fails to compile in MSVC 2010 when OGRE_STATIC=true in january, but it still exists.

I think it is fixed by removing the MingW-only check (or adding MSVC as extra option) in the SampleBrowsers CmakeList.txt (see patch)
You do not have the required permissions to view the files attached to this post.
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99

Re: d3dx9.h not found also issue for msvc2010/msvc2012

Post by Wolfmanfx »

Your patch is a link to the eol patch. Please relink it with the correct file so I can take a look.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 535

Re: d3dx9.h not found also issue for msvc2010/msvc2012

Post by Kojack »

I've never built ogre static so I don't know if this is some extra problem, but VC2010 and above come with a platform sdk that is intentionally missing d3dx9.h, microsoft decided to drop support for it. You need to install the June 2010 directx sdk instead of using the incomplete directx that comes with the platform sdk.