Jump to content
  • Advertisement
Sign in to follow this  
Jacob Roman

DirectX9 SDK Question [RESOLVED]

This topic is 4853 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

After installing the SDK, do I need to manually put the Include files in the Visual Studio .NET's Include folder in order to get the DirectX9 stuff working? The EXE's work without having to do this, but the source code files is whats not working cause of the missing Include files. Also, are there any other files I need to copy and paste before proceeding? [Edited by - Jacob Roman on August 4, 2005 8:15:55 PM]

Share this post


Link to post
Share on other sites
Advertisement
In the ReadMe, it says this

Quote:

Be sure to set the paths to the DirectX 9.0 lib and headers within Visual Studio. They must be listed first. Otherwise you may experience compiler errors.


Where do I do this?

Share this post


Link to post
Share on other sites
Hi Jacob Roman,
How are you doing?

[How to link the libraries and headers?]
Example
[source lang = c++]
#include <d3d9.h>
#include <d3dx9.h>

#pragma comment(lib, "d3dx9.lib")
#pragma comment(lib, "d3dx9d.lib")
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx.lib")
#pragma comment(lib, "DxErr9.lib")



PS: #pragma comment() works with devc++ and VS.NET
I hope this helps.

Share this post


Link to post
Share on other sites
Jacob Roman, when you compile, what kind of errors do you get? Is the compiler complaining about a type or namespace? Are you using C#?

If so, press Ctrl+Alt+L, and at the top right you should see a small window. In it, it says "References", right click on it and click "Add Reference". In the .Net tab, look for "Microsoft.DirectX" and click select, then look for "Microsoft.DirectX.Direct3D" and click select again. Finally, look for ""Microsoft.DirectX.Direct3DX" and once again click select then OK.

In your source code file, you need to add those two lines at the beginning (or after the usings...)

using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;

You're set.

Share this post


Link to post
Share on other sites
I figured it out. Nevermind guys. All I had to do was go up to Tools > Options... And go into Projects > VC++ Directories. Next I use the combobox and select "Include files" and add the path to the SDK's include directory. Then I went to the combobox again and selected "Library files" and add the path to the SDK's lib directory. Ran the source code, it worked like a charm.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!