Advertisement

dev-c++ & directx8 & C

Started by March 08, 2003 09:53 AM
1 comment, last by Pegasus2 21 years, 8 months ago
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
Maybe you broke #pragma once?
Advertisement
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.

This topic is closed to new replies.

Advertisement