Jump to content
  • Advertisement
Sign in to follow this  

Problem Linking DX libraries on C::B

This topic is 4494 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'm trying to link DirectX librarys to my C++ Project on Code::Blocks and i'm getting this linking message "undefined reference to `D3DXCreateSprite@8'". The code is a simple fullscreen win32 window with a Direct3D Initialization (Calling Direct3DCreate9 function), the creation of a Device and a call to the "D3DXCreateSprite" function. For this last one i need the "d3dx9.lib" library. I'm linking d3d9.lib and d3dx9.lib to the project, determining the Directx lib/x86 directory on the "Directories->Liker" tab, and entering only "d3d9" and "d3dx9" on the "Linker->Linker Libraries" field. Here goes some screenshots: . . So i decided to dig a little lower, and i found out that when i use "d3d9" on the second screenshot i'm actuly linking to a "libd3d9.a" file that's in the "lib" flder under CodeBlocks root directory. So when, instead of using that simple way, i link givin the full path for "d3d9.lib" file under Directx directory i got 2 messages: "undefined reference to `Direct3DCreate9@4'" and "undefined reference to `D3DXCreateSprite@8'" In my code, i'm using the statements #pragma comment(lib, "d3d9.lib") #pragma comment(lib, "d3dx9.lib") But don't seems to help. To be honest i'm stucked now... Thanks!

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!