Re: Type redefinitions
Re: Type redefinitions
- Subject: Re: Type redefinitions
- From: Kurt Revis <email@hidden>
- Date: Mon, 3 Dec 2001 11:31:18 -0800
I am writing a HAL plugin. When I include the AudioDriverPlugIn.h
header,
I get redefinition errors regarding types such as UInt8. This occurs
even
when AudioDriverPlugIn.h is the only header included in my source. How
do I get around this problem? Do I need a define or undefine?
What is happening is that <CoreAudio/CoreAudioTypes.h> gets included.
It notes that a bunch of "standard" MacOS types haven't gotten defined
yet, so it defines then. Later on, something includes
<CarbonCore/MacTypes.h>, which defines the same types, without checking
if they've already been defined. So you get an error.
The easy workaround is to #include <CarbonCore/MacTypes.h>, or something
else that will pull it in, before you #include any CoreAudio headers.
In the long run, of course, it would be better if the CoreAudio guys
fixed this. (Exactly how to do that, I don't know.)
--
Kurt Revis
email@hidden