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)

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.

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

d3dx9.lib

d

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.