How do you get this infernal thing to work?

Started by
8 comments, last by NovaCaine 18 years, 7 months ago
I cannot get the sample for DirectX9 to work with VC++ 2005 Express. I start up the test_2005 solution file, I go to debug, and I get a window that says "This Project is out of Date: Test - Debug Win32. Would you like to build it?" So I click yes, then I get this: Compiling... dxstdafx.cpp c:\documents and settings\user\desktop\st00f\test\common\dxstdafx.h(43) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory Build log was saved at "file://c:\Documents and Settings\Compaq_Owner\Desktop\st00f\Test\Debug\BuildLog.htm" Test - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I'm pretty new to the whole windows and DirectX programming, but I know trig and have studied up on a lot of directx resources. Any ideas why it can't find windows.h?
Advertisement
Because you forgot to install the Windows Platform SDK which is required with the Express Edition packages.
Where do I get that SDK?
So, what you need to do is:

First, download ALL of these lovely files from this page

Second, install the Platform SDK according to the instructions on that page.

Third, follow these steps to integrate it into VS8 Beta.

Fourth, manually add in the directories for the Include and Lib folders into your project's configurations. (Additional Include Directories and Additional Library Directories in the C++/Linker tabs respectively)
Okay, thanks a ton.

Now, another small question, please?

I installed the DX9 SDK, but then the (August) one, thinking that the august one would just build on the old one.

But they have seperate directorys and alot of the same files. But the regular one had 222mb, and the (August) one had something like 176. Are both of these needed to use directx, or just the (August) one?
Just the latest SDK will work fine. You will probabally want to remove the older versions since they end up taking up space.
ok, maybe its just me, but i'm having the same problems, i've followed the above instructions but to non avail

just so I know im not going crazy could someone double check my work

this is my VCProjectEngine.Dll.Express.Config file
<?xml version="1.0" encoding="utf-8"?><VCPlatformConfigurationFile 	Version="8.00"	>    <Platform 		Name="VCProjectEngine.dll" 		Identifier="Win32"		>		<Directories 			Include="$(VCInstallDir)include;$(VCInstallDir)PlatformSDK\include;$(FrameworkSDKDir)include; C:\Program Files\Microsoft Platform SDK\Include;"			Library="$(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib; C:\Program Files\Microsoft Platform SDK\Lib;"			Path="$(VCInstallDir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(PATH); C:\Program Files\Microsoft Platform SDK\Bin;"			Reference="$(FrameworkDir)$(FrameworkVersion)"			Source="$(VCInstallDir)crt\src"		/>    </Platform></VCPlatformConfigurationFile>


and this is my corewin_express.vsprops file
<?xml version="1.0"?><VisualStudioPropertySheet 	ProjectType="Visual C++" 	Version="8.00" 	Name="Core Windows Libraries">	<Tool 		Name="VCLinkerTool" 		AdditionalDependencies="kernel32.lib user32.lib gdi.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib" /></VisualStudioPropertySheet>


and when i try to build a win32 app i still get

fatal error C1083: Cannot open include file: 'windows.h': Invalid argument
Quote:and when i try to build a win32 app i still get

fatal error C1083: Cannot open include file: 'windows.h': Invalid argument


Quote:Original post by Drew_Benton
Fourth, manually add in the directories for the Include and Lib folders into your project's configurations. (Additional Include Directories and Additional Library Directories in the C++/Linker tabs respectively)


[wink] You will HAVE to manually set the directories for each project and configuration. No way around it, even though the guide says otherwise.
ok, now i have manually added the include directories to the project but am still getting errors.

fatal error RC1015: cannot open include file 'Windows.h'.

any ideas?
ok, got it working now. ended up following this forum post

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2995

and set VC++ up to read from my enviroment variables.

cheers for all your help

This topic is closed to new replies.

Advertisement