Jump to content
  • Advertisement
Sign in to follow this  
Legion55

problem with direct3dcreate9

This topic is 3792 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 friend look im trying to create a direct object in vc++ 7 with microsoft visual studio 2005 I'Ve linked d3d9.h d3dx9.h d3d9.lib d3dx9.lib windows.h winmm.lib and no problem but when I type: "_d3d9 = Direct3DCreate9(D3D_SDK_VERSION)" then There were build error the errors are error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2440: 'initializing' : cannot convert from 'IDirect3D9 *' to 'int' PLEASE help me PLEase ...what can I do???? thanks thaanks.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Wild Bill Kelso
Looks like you have _d3d9 declared as an int, and not a pointer to IDirect3D9...

Try:

LPDIRECT3D9 pd3d = Direct3DCreate9(D3D_SDK_VERSION);

No he hasnt declared it as an int. The compiler cannot assume type 'int' (apparently the default type in C++) because C++ doesnt assume types.

You need to declare what type of variable _d3d9 is. In this case it is above IDirect3D9* or the typedef LPDIRECT3D9.

You may not want to try Direct3D yet as it seems you are still a beginner in C++ I'm assuming and learning the language should be more of a priority than trying to use the DX sdk at this stage. Correct me if I'm wrong though.

Share this post


Link to post
Share on other sites
thans to u 2 guys i've type
LPDIRECT3D9 g_pD3D = Direct3DCreate9(D3D_SDK_VERSION);
and then the program run successfully thanks really tahnks

Share this post


Link to post
Share on other sites
and look i'm not a beginer in c++ im a beginer in direct sdk, i know something about languages as c# ans c and c++ and assembler because im studing electronic engineering and I know something about poo and desing with uml and rup, but thanks anyway

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!