Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Xarrion

Curious Linker-Error, Dx9

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

I have a curious linkage error. The Linker can not resolve the Symbol IDirect3D9. The necessary lib is available und dx90a-sdk is installed properly.
#include <windows.h>
#include <d3d9.h>

// globals
IDirect3D9* pd3d9;
IDirect3DDevice9* pd3ddevice;

// code goes here
...
 
My Code compiles without warnings and errors, but the linker can not resolve the symbol IDirect3D9. Since IDirect3D9 and IDirect3DDevice are both from d3d9.h i am wondering about that. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Linker wouldn''t report problems for missing types, its the compiler''s job. Does it only say "missing symbol" or something else too ?

Share this post


Link to post
Share on other sites
the error doesn''t really make sense because IDirect3D9 is just an abstract base class so it literally has nothing to link. Are you sure that''s what it says? Maybe it says IID_IDirect3D9. If that''s the case, then make sure you are linking to dxguid.lib

Share this post


Link to post
Share on other sites
Well... you are right i think. I wrote this from memory and I am not at home to proof this :-)

Anyway, I installed dx90asdk and the libpath is set to the proper directory (E:\dx90asdk\Lib in my case). How do I make sure, that dxguid.lib will be linked?

Example-Sources from gamedev.net and from the SDK are compiling and linking properly. Is there a linkeroption i am not aware of?

Share this post


Link to post
Share on other sites
You need a lot more than just the lib path. if you didnt know that, then you aren''t linking to d3d9.lib either. how to set up your linking is dependant on what IDE yer using.

If you''re using Microsoft Visual C++ .NET 2003:
right click on your project name, go to properties, click the linker submenu, click INPUT in that submenu, select "all configurations" in the configure dropdown menu, and then type in the names of the libs you are linking to in the "additional dependencies" textbox. You most-likely need:
d3d9.lib dxguid.lib

if you are using microsoft visual c++ 6.0:
right click on your project and select settings, then click on the "link" tab and add to object/library modules:
d3d9.lib dxguid.lib

Share this post


Link to post
Share on other sites

  • 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!