Jump to content
  • Advertisement
Sign in to follow this  
Endar

OpenGL D3DXMatrixRotationY - load using GetProcAddress?

This topic is 4324 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've just started with D3D and I'm working through the tutorials that came with the Oct '06 SDK. I'm currently on 3: Matrices. My problem is that the linker is complaining that it can't find the 'D3DXMatrixRotationY' function. Now, for 'Direct3DCreate9', I had to load the 'd3d9.dll' library and use 'GetProcAddress' to get it's address so I could call it. Do I have to do the same for every single function that is not a member function of an object? Do I just have to set up a bunch of function pointers just like when you use the OpenGL extensions?

Share this post


Link to post
Share on other sites
Advertisement
How?

I've tried just adding it as a compiler pragma directive, and that doesn't work (well it actually says that it can't find 'd3d9.dll').

Edit:: I just input the full (as opposed to relative) path and it still didn't work.

Edit:: Quote from MSDN article "Linking an Executable to a DLL":
Quote:

With implicit linking, the executable using the DLL links to an import library (.lib file) provided by the maker of the DLL. The operating system loads the DLL when the executable using it is loaded. The client executable calls the DLL's exported functions just as if the functions were contained within the executable.

With explicit linking, the executable using the DLL must make function calls to explicitly load and unload the DLL and to access the DLL's exported functions. The client executable must call the exported functions through a function pointer.


So, what I need to do is implicit linking, right?

Edit:: I just searched for an found a file 'd3d9.lib' which was in the DX SDK directory. I checked to see if the DX SDK directories were actually in the default directories for include files and library files, and they are (using VC++ 2005 express).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

#pragma comment (lib,"d3d9.lib")

Or alternatively you can specify it in the project.

Go to the properties of you project, find the linker settings and the input settings, then additional dependencies, add d3d9.lib there.

Share this post


Link to post
Share on other sites
D3DXMatrixRotationY isn't in d3d9.dll or d3d9.lib, it's part of D3DX. You need to link to d3dx9.lib (Or d3dx9d.lib for the debug version).

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!