Josh McFarlane
2005-10-15 20:14:42 UTC
I'm getting LNK2005 errors all over the place such as:
nafxcwd.lib(afxinl3.obj) : error LNK2005: "public: class CWnd *
__thiscall CWnd::GetOwner(void)const " (?***@CWnd@@***@XZ)
already defined in uafxcwd.lib(afxinl3.obj)
Basically it looks like it's trying to relink all of MFC two complete
times.
I've got two seperate projects, my main application, and a TCP
communication library I'd like to link.
Both link to MFC via static library.
Both are Multi-Threaded Debug.
Anyone know why the refuse to link? I include the header files from the
TCP project, and the generated LIB, but it still has issues all over
the place with the Linker errors.
When I switch to using MFC Shared DLL, I get
LINK : warning LNK4098: defaultlib 'mfc80d.lib' conflicts with use of
other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'mfcs80d.lib' conflicts with use of
other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of
other libs; use /NODEFAULTLIB:library
Which does compile, but worries me.
Anyone care to set me straight on how I should compile my app and my
library? (I also link a static library that uses just the standard
windows library, as well as another 3rd party library that I do not
know what it uses).
Thanks,
Josh McFarlane
nafxcwd.lib(afxinl3.obj) : error LNK2005: "public: class CWnd *
__thiscall CWnd::GetOwner(void)const " (?***@CWnd@@***@XZ)
already defined in uafxcwd.lib(afxinl3.obj)
Basically it looks like it's trying to relink all of MFC two complete
times.
I've got two seperate projects, my main application, and a TCP
communication library I'd like to link.
Both link to MFC via static library.
Both are Multi-Threaded Debug.
Anyone know why the refuse to link? I include the header files from the
TCP project, and the generated LIB, but it still has issues all over
the place with the Linker errors.
When I switch to using MFC Shared DLL, I get
LINK : warning LNK4098: defaultlib 'mfc80d.lib' conflicts with use of
other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'mfcs80d.lib' conflicts with use of
other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of
other libs; use /NODEFAULTLIB:library
Which does compile, but worries me.
Anyone care to set me straight on how I should compile my app and my
library? (I also link a static library that uses just the standard
windows library, as well as another 3rd party library that I do not
know what it uses).
Thanks,
Josh McFarlane