0

I was having some compile errors with my code, along the lines of this:

Error    1    error LNK2001: unresolved external symbol "class _CD3D * __cdecl GetD3DClass(void)" (?GetD3DClass@@YAPAV_CD3D@@XZ)    DLLBot.obj

After some reasearch i found that the problem was directly due to this line:

class _CD3D
    {
    public:
        void __stdcall CustomSetTransform(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
    };

and subsequently these lines also don't work:

_CD3D            __declspec(dllexport) *GetD3DClass();
    _CD3D*            CD3D = GetD3DClass(); // grab core's D3D class

So what is exactly wrong with that line? Btw i am using d3dx9.h (get the header from the directx SDK)

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by Sacky
0

You didn't link with the DirectX 9 .lib files, did you?

You have to setup your compiler to properly find and link the libraries. Generally you need to enter in libs such as d3dx9.lib, d3dinput9.lib, etc. into the "libraries to link with" text box in your "project settings".

A good google search should yield exact instructions for setup on your compiler.

0

Well in my project settings i put the .libs in additional dependencies:

d3dx9.lib

d

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.