Original Post
I am creating a app with DPlay.
But when i try to include a GUID i get all sorts of errors.
Like in "main.h" i define :
{code]
GUID MYAPP_GUID = { 0x2ea835b, 0x9179, 0x485f, { 0x83, 0x43, 0x90, 0x1d, 0x32, 0x7f, 0xe7, 0x94 } };
And when i try to compile i get these errors :
-------------------Configuration: DP - Win32 Debug-------------------- Linking... DPMessagePump.obj : error LNK2005: "struct _GUID MYAPP_GUID" (?MYAPP_GUID@@3U_GUID@@A) already defined in DPlay.obj main.obj : error LNK2005: "struct _GUID MYAPP_GUID" (?MYAPP_GUID@@3U_GUID@@A) already defined in DPlay.obj CButtonWnd.obj : error LNK2005: "struct _GUID MYAPP_GUID" (?MYAPP_GUID@@3U_GUID@@A) already defined in DPlay.obj CEditWnd.obj : error LNK2005: "struct _GUID MYAPP_GUID" (?MYAPP_GUID@@3U_GUID@@A) already defined in DPlay.obj CListBoxWnd.obj : error LNK2005: "struct _GUID MYAPP_GUID" (?MYAPP_GUID@@3U_GUID@@A) already defined in DPlay.obj CStaticWnd.obj : error LNK2005: "struct _GUID MYAPP_GUID" (?MYAPP_GUID@@3U_GUID@@A) already defined in DPlay.obj dxutil.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0 Debug/DP.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. DP.exe - 8 error(s), 0 warning(s)so how is the "correct" way of defining a GUID when i got more than 1 file that will use it ?