Microsoft
Software
Hardware
Network
Question : error LNK2005: (already defined)
When I compile my program, I see linking errors like this...
error LNK2005: _IID_IBoundObjectSite already defined in nafxcwd.lib(occsite.obj)
The problem seems related to my using the Platform SDK header files.
Because I am using some functions defined in the wininet.h update,
I have added "C:\Program Files\Microsoft Platform SDK\Include"
under Tools->Options->Directorie
s
When I place the sdk include directory before all others,
I get the redefinition linking errors.
When I place the sdk include directory after all others,
I get compiler errors like this...
error C2065: 'NIF_INFO' : undeclared identifier
error C2039: 'szInfo' : is not a member of '_NOTIFYICONDATAA'
So some data-structs and constants are not defined if I list the SDK headers last,
but I will get redefinition link errors, if I put the sdk headers first.
What can I do?
One last clue,...
The problem seems to go away when I put the sdk headers first
and link 'dynamically' not 'staticly' to mfc.
Please help.
Any suggestions are much appreciated.
-c
Answer : error LNK2005: (already defined)
Odds are that the Platform SDK includes newer UUID*.LIB files that finally define this IID, which MFC needs to implement data-bound OLE Controls. I think you should try renaming those libs in your Platform SDK libs directory so that MFC can use its own UUID*.LIB files.
..B ekiM
Random Solutions
Changing DNS address of Netowork interface Card using windows script.
Flash will only work when I run IE in admin mode
referencing form variables in adp views
WordPerfect 10 hangs when opening some documents.
SCCM 2007 Constant Despooler error 4406
problem opening word attachment with XP professional
Option Group & Radio Buttons: Which Events To Use
Out of resources error when moving lots of files
Date Format problem in Microsoft Access 2000
active directory, W2k8 R2 DC, Kerberos failures, Event ID: 3, 4771, 4769, 4768, 4776, 4625 source: Microsoft Windows security