Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

stevesherrin

Need Help with D3DApplication

This topic is 5277 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 have created a class that extends CD3DApplication. The only problem I have is in the build I get 9 unresolved externals as follows: D3DApp error LNK2001: unresolved external symbol "public: virtual void __thiscall CD3DApplication:ause(bool)" (?Pause@CD3DApplication@@UAEX_N@Z) D3DApp error LNK2001: unresolved external symbol "public: virtual long __thiscall CD3DApplication::MsgProc(struct HWND__ *,unsigned int,unsigned int,long)" (?MsgProc@CD3DApplication@@UAEJPAUHWND__@@IIJ@Z) D3DApp error LNK2001: unresolved external symbol "public: virtual int __thiscall CD3DApplication::Run(void)" (?Run@CD3DApplication@@UAEHXZ) D3DApp error LNK2001: unresolved external symbol "public: virtual long __thiscall CD3DApplication::Create(struct HINSTANCE__ *)" (?Create@CD3DApplication@@UAEJPAUHINSTANCE__@@@Z) D3DApp error LNK2001: unresolved external symbol "protected: virtual void __thiscall CD3DApplication::UpdateStats(void)" (?UpdateStats@CD3DApplication@@MAEXXZ) D3DApp error LNK2001: unresolved external symbol "protected: virtual long __thiscall CD3DApplication::AdjustWindowForChange(void)" (?AdjustWindowForChange@CD3DApplication@@MAEJXZ) D3DApp error LNK2001: unresolved external symbol "public: __thiscall CD3DApplication::CD3DApplication(void)" (??0CD3DApplication@@$$FQAE@XZ) D3DApp error LNK2001: unresolved external symbol "public: __thiscall CD3DEnumeration::~CD3DEnumeration(void)" (??1CD3DEnumeration@@$$FQAE@XZ) D3DApp error LNK2001: unresolved external symbol "public: __thiscall CD3DEnumeration::~CD3DEnumeration(void)" (??1CD3DEnumeration@@QAE@XZ) I have set the following as my project''s additional dependencies: d3dxof.lib dxguid.lib d3dx9dt.lib d3d9.lib d3dx9.lib winmm.lib and have used the following includes: #include "d3d9.h" #include "dxutil.h" #include "D3DEnumeration.h" #include "d3dx9math.h" #include "d3dsettings.h" #include "d3dapp.h" #include "Windows.h" #include "d3dx9core.h" Am I missing an additional include or library, or do I need to explicitly define those functions within my own class? How do I fix this?

Share this post


Link to post
Share on other sites
Advertisement
First, don''t include d3dx9math and d3dx9core, all you need is d3dx9.h, and when you include it you don''t need to include d3d9.h either.

Second, CD3DApplication is not part of D3D, so linking those libraries won''t pull it in. You may have noticed that the headers weren''t in the standard include directory. In the Common dir you will find the matching cpp files. Add them to your app and all should be well.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Thanks for your helpp... Still having a few problems though...

I got rid of the includes you said, leaving only the following:

#include "d3dx9.h"
#include "dxutil.h"
#include "D3DEnumeration.h"
#include "d3dsettings.h"
#include "d3dapp.h"
#include "Windows.h"

I already had the Common directories added to my includes and source directories. At this point I still get the same 9 unresolved externals. If I add the following source files to my project:

d3dsettings.cpp
d3dutil.cpp
d3dapp.cpp
d3denumeration.cpp

from the common directory, I get a different set of errors that look like the following:

D3DApp error LNK2005: "protected: virtual long __thiscall CMyD3D::ConfirmDevice(struct _D3DCAPS9 *,unsigned long,enum _D3DFORMAT,enum _D3DFORMAT)" (?ConfirmDevice@CMyD3D@@MAEJPAU_D3DCAPS9@@KW4_D3DFORMAT@@1@Z) already defined in MyD3DApp.obj

(This is only one example, but all follow the same format)

What is causing this? I''m still doing at least something wrong here.

Share this post


Link to post
Share on other sites

  • 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!