Archived

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

Link error using CD3DMesh

This topic is 5153 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

Hi, I am trying out the CD3DMesh class that is given in the DirectX SDK (9.0). However, I am unable to get it to build because of unresolved externals in linking. I''m not sure why, here is the code I am using :
CD3DMesh * tempmesh;

tempmesh = new CD3DMesh();
tempmesh->Create(device, _T("Tiger.x") );
Also, here are the header files I include:
#include <windows.h>
#include <stdio.h>

#include <d3d9.h>
#include <d3dx9.h>
#include <dinput.h>
#include <d3dx9math.h>
#include <dxfile.h>
#include <d3dfile.h>
I made sure to link the following: d3dx9.lib d3d9.lib dinput8.lib dxguid.lib d3dxof.lib winmm.lib And, I ensured that I included the correct Include and Src directories in the directory settings, in order to use d3dfile.cpp and d3dfile.h. The errors I get are: Linking... Engine.obj : error LNK2001: unresolved external symbol "public: long __thiscall CD3DMesh::Create(struct IDirect3DDevice9 *,char *)" (?Create@CD3DMesh@@QAEJPAUIDirect3DDevice9@@PAD@Z) Engine.obj : error LNK2001: unresolved external symbol "public: __thiscall CD3DMesh::CD3DMesh(char *)" (??0CD3DMesh@@QAE@PAD@Z) Debug/Engine.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. Can anybody help me out? Thanks.

Share this post


Link to post
Share on other sites
The CD3DMesh is not standard directX. It''s just appart of the sample framework.

So if you have a look at the \Samples\C++\Direct3D\ProgressiveMesh you could find what is missing...

______________________________
ohh well what the heck lets try it?

Share this post


Link to post
Share on other sites