|
-
September 7th, 2012, 09:12 AM
#1
linking errors: xxx already defined
So here goes another linking error thread!
I am forced to have the deceleration of a class template in the .h file.
See here: http://forums.codeguru.com/showthrea...t=#post2081723
This works perfectly fine, as long as i #inlcude the header file only in ONE .cpp file.
The moment i #inlude it in several .cpp files, i get LNK2005 already-defined errors.
a.obj : error LNK2005: "public: unsigned int * __thiscall theclass::themthod(void)" (?xxx@theclass@@QAEPAIXZ) already defined in b.obj
I would have assumed inclusion guards can protect me from this, but wrong.
After 4+ hours trying to figure this out, i am in desperate need for some help.
nice weekend to everyone!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|