please help a dumb Aussie developer - DX8 common files

Started by
1 comment, last by Rappo_David 20 years, 11 months ago
Hi, I''m having trouble using the common files included with the DX8 SDK (d3dapp.h, d3dfont.h, etc.) to build a simple D3D app. I believe that my compiler is configured correctly with regards to include paths and so forth, but when I try to build the app I get a bunch of linker errors. All of the errors appear to be related to the CD3DApplication class. // main.cpp #include #include #include #include #include "D3DApp.h" #include "D3DFont.h" #include "D3DUtil.h" #include "DXUtil.h" #include "resource.h" class CMyD3DApplication : public CD3DApplication { LPDIRECT3DVERTEXBUFFER8 m_pVB; // Buffer to hold vertices DWORD m_dwSizeofVertices; HRESULT ConfirmDevice( D3DCAPS8*, DWORD, D3DFORMAT ); protected: HRESULT OneTimeSceneInit(); HRESULT InitDeviceObjects(); HRESULT RestoreDeviceObjects(); HRESULT InvalidateDeviceObjects(); HRESULT DeleteDeviceObjects(); HRESULT Render(); HRESULT FrameMove(); HRESULT FinalCleanup(); public: CMyD3DApplication(); }; INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT ) { CMyD3DApplication d3dApp; if( FAILED( d3dApp.Create( hInst ) ) ) return 0; return d3dApp.Run(); } // implementation of inherited CD3DApplication methods follows ... ------------------Configuration: basic - Win32 Debug-------------------- Linking... basic.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CD3DApplication::Run(void)" (?Run@CD3DApplication@@UAEHXZ) basic.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CD3DApplication::Create(struct HINSTANCE__ *)" (?Create@CD3DApplication@@UAEJPAUHINSTANCE__@@@Z) basic.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CD3DApplication:ause(int)" (?Pause@CD3DApplication@@UAEXH@Z) basic.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CD3DApplication::MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MsgProc@CD3DApplication@@UAEJPAUHWND__@@IIJ@Z) basic.obj : error LNK2001: unresolved external symbol "protected: virtual long __thiscall CD3DApplication::AdjustWindowForChange(void)" (?AdjustWindowForChange@CD3DApplication@@MAEJXZ) basic.obj : error LNK2001: unresolved external symbol "public: __thiscall CD3DApplication::CD3DApplication(void)" (??0CD3DApplication@@QAE@XZ) Debug/basic.exe : fatal error LNK1120: 6 unresolved externals Error executing link.exe. basic.exe - 7 error(s), 0 warning(s) If anybody can point out what I am doing wrong I''d really appreciate it. I''m using Visual C++ 6 and my OS is Win2K. Thanks David
Advertisement
Have you added the CDX .lib or source file(s) to your project? The linker is telling you it can''t find executable code for the CD3DApplication functions Run(), Pause(), etc - all of which should be in a source file and compiled along with your project or in a .lib file (precompiled).

Just for the "correctness" lawyers/freaks, it is also possible that the executable code exists in a DLL, but given the code you present above I discard that as a possible case.


I wanna work for Microsoft!
I get this one a lot, you didn''t put the include directive or you inherited the functionh on did not define it.

This topic is closed to new replies.

Advertisement