dev-c++ & directx8 & C
I have no problem when I compile a c++ directdraw app.
But when I try to compile one wrote in C, I get the following errors :
23 donuts.h
from c:\dev-cpp\projets\donut\donuts.c:68:
211 c:\dev-cpp\include\dx8\ddraw.h
redefinition of `HRESULT''
146 c:\dev-cpp\include\windef.h
`HRESULT'' previously declared here
25 donuts.h
from c:\dev-cpp\projets\donut\donuts.c:68:
228 c:\dev-cpp\include\dx8\dsound.h
redefinition of `LPCWAVEFORMATEX''
1013 c:\dev-cpp\include\mmsystem.h
`LPCWAVEFORMATEX'' previously declared here
1888 c:\dev-cpp\include\dx8\dsound.h
redefinition of `LPDIRECTSOUNDFULLDUPLEX''
175 c:\dev-cpp\include\dx8\dsound.h
`LPDIRECTSOUNDFULLDUPLEX'' previously declared here
15 dsutil.c
C:\DEV-Cpp\Include\dx8\dsound.h:228: redefinition of `LPCWAVEFORMATEX''
1013 c:\dev-cpp\include\mmsystem.h
`LPCWAVEFORMATEX'' previously declared here
1888 c:\dev-cpp\include\dx8\dsound.h
redefinition of `LPDIRECTSOUNDFULLDUPLEX''
175 c:\dev-cpp\include\dx8\dsound.h
`LPDIRECTSOUNDFULLDUPLEX'' previously declared here
49 dsutil.c
`DSBCAPS_CTRLDEFAULT'' undeclared (first use in this function)
49 dsutil.c
(Each undeclared identifier is reported only once
49 dsutil.c
for each function it appears in.)
127 dsutil.c
warning: passing arg 5 of `DSGetWaveResource'' from incompatible pointer type
13 ddutil.c
C:\DEV-Cpp\Include\dx8\ddraw.h:211: redefinition of `HRESULT''
146 c:\dev-cpp\include\windef.h
`HRESULT'' previously declared here
So, what''s wrong?
Apparently there is an error in ddraw.h
March 08, 2003 12:45 PM
instead of using: #define <ddaw.h> in your files use:
#ifdef DDRAW_H
#define DDRAW_H
It looked like you were declared the same header in more than one file. The preceeding should fix it.
#ifdef DDRAW_H
#define DDRAW_H
It looked like you were declared the same header in more than one file. The preceeding should fix it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement