Archived

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

mithrill

Linker error caused by D3DRM_XTEMPLATES

Recommended Posts

mithrill    122
I have recently bought the "advanced animation with DirectX" book and have downloaded DirectX9 SDK and installed it. I have still the DirectX 8 SDK installed but i have removed all reference in the linker command line, and in the lib and include directories in the directories folder for my projects. I have written the Parser class according to the book. I have included all the DirectX header files in this class d3d9.h, d3dx9.h, dxfile.h, rmxfguid.h, rmxftmpl.h, and mmsystem.h My problem is that when i use the CParser class in my Main class. i get the Linker error: "error LNK 2005:"unsigned char * D3DRM_XTEMPLATES"(?D3DRM_XTEMPLATES@@3PAEA) already defined in TESTX.obj" TESTX would be my project name. I have tried removing all the code in the CParser class but that wont work either until i remove the rmxftmpl.h header file. so it seems that it is including the rmxftmpl.h that causes the problem. But what really confuses me is that if i include all the DirectX header files in my Main class including the rmxftmpl.h, and implement the parser code there, I get no linker error at all. I would appreciate all the answer i get

Share this post


Link to post
Share on other sites
mithrill    122
I solved it in a way. It seems that the problem was that I included the "rmxftmpl.h" in the Cparser header file. It worked fine if i included "rmxftmpl.h" in the CParser.cpp file. But I still dont understand why that would make a difference.

Share this post


Link to post
Share on other sites