Re: Linker Errors 2005 and 1104
From: dw85745 (dw85745_at_gbronline.com)
Date: 05/25/04
- Next message: Balboos: "Re: Is there a Visual C++ Net only product ???"
- Previous message: homecurr_at_yahoo.com: "CHtmlView mouse right clicked"
- In reply to: dw85745: "Linker Errors 2005 and 1104"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 May 2004 15:47:27 -0700
Thanks Mr. Partch and Mr. Newcomer.
Got rid of the global and invoked Unicode.
Still compiles OK, but failing on linkage. What I find interesting is I'm
even failing on:
error LNK2005: "public: __thiscall CString::CString(void)"
(??0CString@@QAE@XZ) already defined in mfc42u.lib(MFC42u.DLL)
Appears I'm twice defining something (????). How do I debug linkage errors?
Heres an sampling of the 100 errors of LNK 2005:
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO
specification
nafxcwd.lib(afxinl1.obj) : error LNK2005: "public: virtual void __thiscall
CObject::Serialize(class CArchive &)"
(?Serialize@CObject@@UAEXAAVCArchive@@@Z) already defined in NAQX.obj
nafxcwd.lib(afxinl1.obj) : error LNK2005: "public: __thiscall
CString::CString(void)" (??0CString@@QAE@XZ) already defined in
mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(strex.obj) : error LNK2005: "public: void __thiscall
CString::TrimRight(void)" (?TrimRight@CString@@QAEXXZ) already defined in
mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(strex.obj) : error LNK2005: "public: void __thiscall
CString::TrimLeft(void)" (?TrimLeft@CString@@QAEXXZ) already defined in
mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(sockcore.obj) : error LNK2005: "public: __thiscall
CAsyncSocket::CAsyncSocket(void)" (??0CAsyncSocket@@QAE@XZ) already defined
in mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(sockcore.obj) : error LNK2005: "public: virtual int __thiscall
CAsyncSocket::Accept(class CAsyncSocket &,struct sockaddr *,int *)"
(?Accept@CAsyncSocket@@UAEHAAV1@PAUsockaddr@@PAH@Z) already defined in
mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(sockcore.obj) : error LNK2005: "public: virtual void __thiscall
CAsyncSocket::Close(void)" (?Close@CAsyncSocket@@UAEXXZ) already defined in
mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(sockcore.obj) : error LNK2005: "public: virtual int __thiscall
CAsyncSocket::Receive(void *,int,int)" (?Receive@CAsyncSocket@@UAEHPAXHH@Z)
already defined in mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(sockcore.obj) : error LNK2005: "public: virtual int __thiscall
CAsyncSocket::Send(void const *,int,int)" (?Send@CAsyncSocket@@UAEHPBXHH@Z)
already defined in mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(sockcore.obj) : error LNK2005: "protected: virtual void
__thiscall CAsyncSocket::OnOutOfBandData(int)"
(?OnOutOfBandData@CAsyncSocket@@MAEXH@Z) already defined in
mfc42u.lib(MFC42u.DLL)
nafxcwd.lib(sockcore.obj) : error LNK2005: "protected: virtual void
__thiscall CAsyncSocket::OnAccept(int)" (?OnAccept@CAsyncSocket@@MAEXH@Z)
already defined in mfc42u.lib(MFC42u.DLL)
n
Thanks
David
----------------------------
"dw85745" <dw85745@gbronline.com> wrote in message
news:a5ydnXEtsuGuJi3dRVn-sA@gbronline.com...
> I received the following link errors:
>
> Linking...
> NAQXCtl.obj : error LNK2005: "class CMyConnMngr * g_pMyConnMngr"
> (?g_pMyConnMngr@@3PAVCMyConnMngr@@A) already defined in NAQX.obj
> NAQXPpg.obj : error LNK2005: "class CMyConnMngr * g_pMyConnMngr"
> (?g_pMyConnMngr@@3PAVCMyConnMngr@@A) already defined in NAQX.obj
> LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO
> specification
> LINK : fatal error LNK1104: cannot open file "mfc42u.lib"
> Error executing link.exe.
>
> ------------------------------------------
> Error 2005
>
> MSDN says:
>
> The most common cause of this error is accidentally linking with both the
> single-threaded and multithreaded libraries. Ensure that the application
> project file includes only the appropriate libraries and that any
> third-party libraries have appropriately created single-threaded or
> multithreaded versions.
>
>
> QUESTION:
>
> How do I change whether I'm using single-threaded or multi-threaded within
> VC++6??
> BTW: I am using one library which I was provided and included in
> Project/Settings/Link.
> -----------------------------------------
>
> -----------------------------------------
> Error 1104
>
> MSDN says:
>
> cannot open file "filename"
>
> The tool could not open the given file. May not exist.
>
>
> QUESTION:
> Is mfc42u.lib used with VC6++?
> If not why is it showing up -- for example referenced in the library which
I
> was provided and included in Project/Settings/Link??
> -------------------------------------------
>
> Thanks
> David
>
>
- Next message: Balboos: "Re: Is there a Visual C++ Net only product ???"
- Previous message: homecurr_at_yahoo.com: "CHtmlView mouse right clicked"
- In reply to: dw85745: "Linker Errors 2005 and 1104"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|