LNK2005: Symbol already defined

I scanned the other questions concerning LNK2005, but I did not see my situation represented.

Here is the first of 16 very similar errors:

1>atlsd.lib(atltypes.obj) : error LNK2005: "public: __thiscall CRect::CRect(void)" (??0CRect@@QAE@XZ) already defined in mapiexlib.lib(DynDialogItemEx.obj)

When attempting to link in atlsd.lib, the linker THOUGHT it saw "CRect::CRect() defined in the DynDialogEx.obj part of mapiexlib.lib. The only problem is that CRect::CRect() is NOT defined in DynDialodEx.obj. There also exists a file DynDialogEx.lib, which happens to be a STATIC library, so I can use LIB.exe /LIST DynDialogEx.lib to see what is in there. Nothing that looks like CRect::CRect(), is what's in there.

Why does the linker think that DynDialogEx.obj defines CRect::CRect()?

All of the rest of the errors (except for 2 unresolved externs and an error telling me that there are 2 unresolved externs) are exactly similar:

atlsd.lib : XYZ {function|method|procedure|subroutine} already defined in SomeOtherLibThatHasNothingToDoWithTheDuplicateSymbol.lib

I'm sure that you will want some source code, so please let me know which header files (from my project, DynDialogEx.cpp's headers, or mapiexlib.lib's header files), and any source files. I've been through all the sources and headers that I have code for, but I cannot see where the duplication is coming from.

Please help!

Thank you.
Topic archived. No new replies allowed.