Re: Linker error - fooView.obj LNK2005: _IID_IProvideTaskPage already defined in fooDoc.obj
From: Joseph M. Newcomer (newcomer_at_flounder.com)
Date: 02/25/04
- Next message: Johan Rosengren: "Re: CListBox + CCtrlView"
- Previous message: Joseph M. Newcomer: "Re: Obtaining values from datafile"
- In reply to: Al: "Linker error - fooView.obj LNK2005: _IID_IProvideTaskPage already defined in fooDoc.obj"
- Next in thread: Al: "Re: Linker error - fooView.obj LNK2005: _IID_IProvideTaskPage already defined in fooDoc.obj"
- Reply: Al: "Re: Linker error - fooView.obj LNK2005: _IID_IProvideTaskPage already defined in fooDoc.obj"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Feb 2004 12:26:47 -0500
Sounds like you have included a header file what declares an IID_ and CLSID_ variable in
the .h file, and the .h file is now included in two other files. Never declare variables
in header files.
joe
On Wed, 25 Feb 2004 07:51:06 -0800, "Al" <anonymous@discussions.microsoft.com> wrote:
>I'm suddenly getting the linker error
>fooView.obj : error LNK2005: _IID_IProvideTaskPage already defined in fooDoc.obj
>and the same error for _CLSID_CTaskScheduler, _CLSID_CTask, _IID_ITaskScheduler and a load more related interfaces.
>
>This wasn't there 2 weeks ago when I put this project aside. Now it's appeared and I don't know why. Probably something to do with a registry change that made pretty much every application on the PC think it was newly installed (Windows wanting me to take the Windows Tour, Outlook needing mailbox settings, Office showing the office assistant, WinZip asking which interface to use etc etc, IE forgetting my homepage) but I don't know how to fix it!
>
>Granted, fooDoc.obj does do stuff with the task scheduler com interfaces but fooView.obj does not (not knowingly anyway) and none of them are defining these interfaces as far as I can see, they just use them. So what's going on?
>
>--- Al.
>
>Sorry about the long post, I'm not very good at being concise!
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
- Next message: Johan Rosengren: "Re: CListBox + CCtrlView"
- Previous message: Joseph M. Newcomer: "Re: Obtaining values from datafile"
- In reply to: Al: "Linker error - fooView.obj LNK2005: _IID_IProvideTaskPage already defined in fooDoc.obj"
- Next in thread: Al: "Re: Linker error - fooView.obj LNK2005: _IID_IProvideTaskPage already defined in fooDoc.obj"
- Reply: Al: "Re: Linker error - fooView.obj LNK2005: _IID_IProvideTaskPage already defined in fooDoc.obj"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|