• Advertisement

Archived

This topic is now archived and is closed to further replies.

Anti-linking with directdraw

This topic is 6521 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I seem to be having problems, when I include the directdraw header in more than one source file. And maybe initialize a structure I get errors like the ones below. I know there is away around this, but could someone please help me. Thanks. main.obj : error LNK2005: "struct IDirectDrawClipper * lpddclipper" (?lpddclipper@@3PAUIDirectDrawClipper@@A) already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDrawGammaControl already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDrawColorControl already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDrawClipper already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDrawPalette already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDrawSurface4 already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDrawSurface3 already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDrawSurface2 already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDrawSurface already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDraw4 already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDraw2 already defined in bitmap.obj main.obj : error LNK2005: _IID_IDirectDraw already defined in bitmap.obj main.obj : error LNK2005: _CLSID_DirectDrawClipper already defined in bitmap.obj main.obj : error LNK2005: _CLSID_DirectDraw already defined in bitmap.obj

Share this post


Link to post
Share on other sites
Advertisement
are you linking with dxguid.lib or #defining INITGUID in your source? INITGUID can only be declared in ONE source module.

crazy166
some people think i'm crazy, some people know it

Share this post


Link to post
Share on other sites

Yep thanks alot. I had done this in two source files.

#define INITGUID

-David

Share this post


Link to post
Share on other sites

  • Advertisement