Sign in to follow this  
Konstantin Vikhrov

DirectX trouble

Recommended Posts

Hello, guys! I am using Visual Studio .NET C++ for the development. I pretend to incorporate DirectX to manage sound and graphics of a 2D game I am making. I have added the following libraries to the linker input/additional dependencies: d3d9.lib, d3dx9.lib, dsound.lib, dxguid.lib dxerr9.lib. The sprites will be managed as objects of a Sprite class. I want to include a member variable in this Sprite class (in the Sprite.h file) of LPDIRECT3DTEXTURE9 type, which gives me no problem when compiling the project. The issue is when I try to #include this Sprite.h in its respective Sprite.cpp source file to define several functions in it. This is where the compiler complains, as if LPDIRECT3DTEXTURE9 type were not recognized. In the Sprite.h I only #include <windows.h>. And Sprite.cpp, in turn, only includes Sprite.h. Why is this happening? Must any other header be explicitly included? Your help on this matter will be much appreciated. Have an excellent day.

Share this post

Link to post
Share on other sites

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