Skip to main content
gamedev.net
🔒 Locked

Linker errors.. =|

Started by Fuzztrek Oct 6, 2002 at 3:26 PM 3 replies 450+ views
Original Post
Fuzztrek
Fuzztrek
Hello all.. I am getting this linker error when i try to compile my project: error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj I really hate posting linker errors because they are usually something really common or make you feel stupid after you figure out what the problem is.. but this one is really bugging me. I looked up LNK2005 at msdn and it listed off a bunch of things that might be wrong if you get this error. Most were about redefining variables and/or including multiple files from different libraries.. ie multitasking libraries when you aren''t multitasking. However, nothing i tried has resolved the error. Help greatly appreciated!! ¬_¬
Fruny
Fruny
non-extern variable declaration in a header file.

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Fuzztrek
Fuzztrek
hmm.. i can''t find anythign in my project that might screw it up.. any other ideas?

¬_¬
Fuzztrek
Fuzztrek
here is the whole error:


  
Linking...
D3D_light.obj : error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj
D3D_main.obj : error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj
D3D_material.obj : error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj
D3D_object.obj : error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj
D3D_primitive.obj : error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj
D3D_quad.obj : error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj
D3D_texture.obj : error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj
D3D_world.obj : error LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined in D3D_camera.obj


Does this mean that it is only in the camera header or cpp file? O_o..

¬_¬
Fuzztrek
Fuzztrek
nevermind.. turns out that i included rmxfguid.h, rmxftmpl.h and dxfile.h when i didn''t have to..

D3DRM_XTEMPLATES is a structure (i think.. i kinda forget) which is included in rmxftmpl.h. I was including rmxftmpl.h in all of my files, and i suspect that is why it was tripping up the complier. All better now!!

thx anyway.

¬_¬

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.