Jump to content
  • Advertisement
Sign in to follow this  
Konstantin Vikhrov

DirectX trouble

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

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!