You may be #including ddraw.h more than once. Try this little trick -
At the start of each header file, put the following:
#ifndef _MYHEADER_H
#define _MYHEADER_H
// all of your code
// bottom of file
#endif // _MYHEADER_H
This prevents Multiple Inclusion, so header files only get included once.
>From: "Someone@Kilpatrick's" <klk...@al...>
>To: "Daniel Glenfield" <sp...@ho...>
>Subject: Re: [Dev-C++] DirectDraw7
>Date: Thu, 22 May 2003 20:34:03 -0400
>
>OK, I fixed that problem, but now all of the direct draw interfaces are
>defined too many times.
>I'm sure that ddraw.h is only included once. For example:
>
>SpriteEng.cpp ...\My
>Documents\DevC++\Projects\SpriteTest\SpriteEng.o(.text+0xb0)
>multiple definition of `IID_IDirectDrawSurface7'
>
>SpriteEng.cpp ...\My
>Documents\DevC++\Projects\SpriteTest\SpriteEng.o(.text+0x10)
>multiple definition of `CLSID_DirectDraw7'
>
>What can I do about this?
>
>----- Original Message -----
>From: "Daniel Glenfield" <sp...@ho...>
>To: <klk...@al...>; <dev...@li...>
>Sent: Thursday, May 22, 2003 5:26 AM
>Subject: Re: [Dev-C++] DirectDraw7
>
>
> > guidgen.exe is a MS app that creates a unique 128-bit Id number for COM
> > object. Dx is based on COM.
> >
> > If you're getting those linker errors you're not using the right
>libraries.
> > Make sure they are in the project options -> Libraries list
> >
> >
> > >From: "Someone@Kilpatrick's" <klk...@al...>
> > >To: <dev...@li...>
> > >Subject: [Dev-C++] DirectDraw7
> > >Date: Wed, 21 May 2003 22:19:06 -0400
> > >
> > >I get the following errors:
> > >
> > >[Linker error] undefined reference to `IID_IDirectDraw7'
> > >[Linker error] undefined reference to `DirectDrawCreateEx@16'
> > >
> > >What can I do? Where is guidgen.exe?
> >
> > _________________________________________________________________
> > Tired of 56k? Get a FREE BT Broadband connection
> > http://www.msn.co.uk/specials/btbroadband
> >
> >
>
_________________________________________________________________
Find a cheaper internet access deal - choose one to suit you.
http://www.msn.co.uk/internetaccess
|