Public Group

# 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.

## 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 on other sites
It semms i have a problem on those images... re-posting

1. 1
Rutin
32
2. 2
3. 3
4. 4
5. 5

• 11
• 13
• 87
• 11
• 10
• ### Forum Statistics

• Total Topics
632973
• Total Posts
3009615
• ### Who's Online (See full list)

There are no registered users currently online

×