[Helix-client-dev] Confusion about GUID
David Audrain daudrain at roundbox.comHi Stanley,
You have to add a cpp file where these GUIDs will be defined, look at
dlliids.cpp in client/core.
GUIDs are always linked at the final stage(dlls or executables) to avoid
duplicate symbols.
David
stanley kao wrote:
> Hi All,
>
> I am confused about GUIDs. I got the following errors
>
>
>
> libhxclient.lib(CHXClientEngine.obj) : error LNK2001: unresolved external
> symbol
> _IID_IHXClientEngine
> libhxclient.lib(CHXClientEngine.obj) : error LNK2001: unresolved external
> symbol
> _IID_IHXClientEngineSetup
> libhxclient.lib(CHXClientPlayer.obj) : error LNK2001: unresolved external
> symbol
> _IID_IHXGroupManager
> libhxclient.lib(CHXClientPlayer.obj) : error LNK2001: unresolved external
> symbol
> _IID_IHXRecordManager
> libhxclient.lib(CHXClientPlayer.obj) : error LNK2001: unresolved external
> symbol
> _IID_IHXClientRecordService
> libhxclient.lib(CHXClientPlayer.obj) : error LNK2001: unresolved external
> symbol
> _IID_IHXCommonClassFactory
> libhxclient.lib(CHXClientDataStream.obj) : error LNK2001: unresolved
> external sy
> mbol _IID_IHXCommonClassFactory
> libhxclient.lib(CHXClientSite.obj) : error LNK2001: unresolved external
> symbol _
> IID_IHXCommonClassFactory
>
>
> It goes on and on but basically it cannot find any of the IID_IHX* symbols.
> These IID_IHX* symbols are defined in multiple helix headder files.
> For example in hxwin.h is the definition for IID_IHXSiteWatcher.
>
> DEFINE_GUID(IID_IHXSiteWatcher, 0x00000D05, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
> 0xa0, 0x24, 0x40, 0x6d, 0x59);
>
>
> So it seems like if libhxclient.lib includes hxwin.h then IID_IHXSiteWatcher
> shouldn't be an external symbol. However in hxcom.h is the definition of
> the DEFINE_GUID macro.
>
> #if defined(HELIX_FEATURE_FULLGUID)
>
> #if !defined (INITGUID) || (defined (_STATICALLY_LINKED) &&
> !defined(NCIHACK))
>
> #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
> EXTERN_C const GUID FAR name
>
> #define DEFINE_GUID_ENUM(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
> EXTERN_C const GUID FAR name;
>
> #else /*#if !defined (INITGUID) || (defined (_STATICALLY_LINKED) &&
> !defined(NCIHACK)) */
>
> #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
> EXTERN_C const GUID name \
> = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
>
> #define DEFINE_GUID_ENUM(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
> EXTERN_C const GUID name \
> = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } };
>
> #endif /*#if !defined (INITGUID) || (defined (_STATICALLY_LINKED) &&
> !defined(NCIHACK)) #else */
>
> #endif /* #if defined(HELIX_FEATURE_FULLGUID) */
>
>
> So if libhxclient.lib is built as a static library then IID_IHXSiteWatcher
> always become an extern. So if it is an extern then where is the actual
> definition of IID_IHXSiteWatcher. I can't find it anywhere. This same
> thing applies to all of the IID_IHX* variables.
>
>
> -stan
>
>
>
> _______________________________________________
> Helix-client-dev mailing list
> Helix-client-dev at helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev
>
>