Oh WOW you really do forget how much of a headache getting Visual C++ ready to use is. Fixing these errors is so majorly counter-intuitive, and from the point of view of someone who programs in C++ once in a blue moon it’s a total pig when you want to spend an evening programming then realise you’ve reformatted and gotta install everything again.
Anyway a check-list to myself and hopefully will help others. To get Visual Studio and (optionally) set up with the DirectX SDK, there is a hell of a lot of messing around to do.
Download and install Visual Studio 2008.
Microsoft Visual Studio Web Authoring Component failed to install – WebDesignerCore.EXE download
First problem was this bugger. The suggestion I came across was “re-download VS 2008″ as it’s corrupt. If Virgin Media hadn’t capped me to 250Kbps that wouldn’t be such a problem, but unfortunately the UK is a country where you’re not allowed to use your 10Mbps connection without severe punishment.
The solution here? Download WebDesignerCore.EXE – you can get it from Microsoft.com. Extract it using WinRAR (it can read the .exe as an archive). Install manually.
Now try to install Visual Studio 2008 again – it’ll probably work nicely.
NOTE: If you still have problems with this component, you might like to try fiddling with the versioning as described at ScrewTheWeb.com and MSNVPS.
fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory
Next up, cannot open include file windows.h. Great – it turns out the Windows Platform SDK doesn’t come with Visual Studio – a serious “WTF” there! It also turns out they’ve bloated the latest release by an extra gig – from ~400mb to ~1,300mb. So go download the Windows Platform SDK.
This was extra irritating on my 250Mbps cap. *grumble moan grumble*
fatal error C1083: Cannot open include file: ‘d3dx9.h’: No such file or directory
Argh – now what?! You need to set up Visual Studio to look for the DirectX SDK stuff. You did download and install the DirectX SDK, right? Oh well good news – there’s another ~450MB for you to download.
Once that’s installed, in Visual Studio 2008, go to Tools -> Options -> Projects and Solutions -> VC++ Directories. In the top right drop-down menu, where it says “Executable Files”, change that to “Include Files”. Add to the list (double click just after the last entry to create a new one) your SDK Include directory – mine is “C:\Program Files (x86)\Microsoft DirectX SDK (November 2008)\Include”, but perhaps you installed yours somewhere more sensible.
fatal error LNK1104: cannot open file ‘dxerr.lib’
Joy! More errors! There must be some way to fix this properly, however you can solve it by copying from your “Microsoft DirectX SDK (November 2008)\Lib\x86″ directory into your projects directory. You will get a bunch of these – including a d3dx9d.lib error – which shouldn’t be confused with the one above.
To get my simple project working I had to copy over:
- d3dx9d.lib
- d3dx10d.lib
- DxErr.lib
- dxguid.lib
Fingers crossed, now everything works!
It took a while, but now I can compile a fantastic DirectX project that shows me a blank blue screen. Deep breath. One evening wasted, hopefully I can actually get on with some programming today.
28/12/2009 at 7:47 pm Permalink
For the libraries do the same thing you did with includes, in the drop down list select ‘Libraries’ then double click below the last entry, find the library path and add it; ‘C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Lib’.
It’s much cleaner, and simpler since you can do both in the same window and not have to copy files around.
28/12/2009 at 10:13 pm Permalink
Thanks – that is much cleaner