Sign in to follow this  

VC++ 2005 Express and DIrectX 9 SDK

This topic is 4338 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I am a newbie, esxpicaly with DirectX9. In fact I know next to nothing. I have Jonathn Harbour's book "Begining Game Program" and am try to get things to work. My first problem was that I was using NS VC++ 6.0 which appearently isn't compatible with DX9.0c. I then downloaded VC++ 2005 Express, the Platform SDK and have installed both. I have the DX9 SDK in a different path, but have used the "Tools/Options/VC++ Directories" to add the appropriate path. Now that I have done that, it finds d3d9.h, but I now get a fatal error stating that it can't find Stdlib.h. The error message is listed below. Error 1 fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory h:\c++\microsoft visual studio\microsoft directx sdk (december 2005)\include\d3d9.h 37 I have searched my drive, and I do have the header file "stdlib.h:, but it is in a different directory than d3d9.h Is it getting lost and not getting back to where the Platform SDK Include directory is located at? Any help will be greatly appreciated! TIA Nathan

Share this post


Link to post
Share on other sites
Quote:
Original post by Sr_Guapo
Are you sure you set up the platform SDK up correfctly? There is a tutorial on the MS site somewhere about it...


Pretty sure I did, or at least for the Platform SDK. The DIrectX 9 SDK, i just setup on my own.

Also, since my first post I have solved the problem somewhat by adding the specific directory of VC\Include AFTER my pointer to the DX9 SDK include directory. This seemed to solve most of my problems. I also had to =change the original source code to deal with Unicode (added the _T macro - about which I know nothing about).

IF anyone knows the correct solution to the original problem, I would realy like to know what it is.

Now another problem. It runs through the commplie but I now get an error message stateing

Error 3 error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "int __cdecl Game_Init(struct HWND__ *)" (?Game_Init@@YAHPAUHWND__@@@Z) d3dwin.obj

Now, for this I have NO IDEAL where to start, and if it is a Direct X issue, or just a normal program/build issue.

Any help??

Thanks,


Share this post


Link to post
Share on other sites
Sounds like you need to add the libraries to the linker options.
In the project properties (make sure Configuration is All Configurations) go to Linker->Input and add the following to "Additional Dependencies":

d3d9.lib d3dx9.lib


And I don't totally understand what you've done regarding your first problem, but it sounds to me like you have the right solution. If you're passed the error, I'm sure it's fine.

Hope that helps.

Share this post


Link to post
Share on other sites

This topic is 4338 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this