• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble compiling myMacheaders CW 9.5 OS 10.4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble compiling myMacheaders CW 9.5 OS 10.4


  • Subject: Re: Trouble compiling myMacheaders CW 9.5 OS 10.4
  • From: Stephen Davis <email@hidden>
  • Date: Mon, 9 May 2005 11:18:45 -0700

On May 9, 2005, at 10:07 AM, Bruce Coughlin wrote:

This might be a CW problem but perhaps the error msg will give a clue as to how I can fix this:

I'm having trouble compiling myMacHeaders with CW 9.5 under OS 10.4. I get
the following error msg:

Error   : types that are declared in parameter lists ('ScheduledAudioSlice')
go out of scope at the end of the function declaration/definition,
this is probably not what you want (maybe use a forward declaration?)
(included from:
 AudioUnit/AudioUnit.h:26
 AudioToolbox/AUGraph.h:73
 myMacHeaders9Mach-O.c:50
 MSL MacHeadersMach-O.pch:23)
AudioUnitProperties.h line 1128       struct ScheduledAudioSlice *bufferList); 

You typically see this warning in C++ (odd, since you said it was for C) because, technically speaking, the "implicit name spaces" (I'm making that term up) of the following two declarations are different for the ScheduledAudioSlice structure.  When a "struct Blah" parameter is implicitly declared in a function prototype, it has a different signature than it would if it had been previously forward-declared.

struct ScheduledAudioSlice;

typedef void (*ScheduledAudioSliceCompletionProc)(void *userData,
                struct ScheduledAudioSlice *bufferList);

vs.

typedef void (*ScheduledAudioSliceCompletionProc)(void *userData,
                struct ScheduledAudioSlice *bufferList);

The compiler is telling you that there is a distinction and that forward declaring struct ScheduledAudioSlice would fix it.

The pre-9.4 CW compiler would ignore these but the 9.4 compiler and beyond became more strict.  gcc already issues this warning so in this case CW has become more like gcc.

This compiled fine under 10.3 and CW 9.4.
I've installed (and re-installed) the CoreAudioSDK from the Tiger 10.4 CD (Xtools folder).
The C++ version compiles fine. It's the plain C version I'm having trouble with.

Which is bizarre b/c I think only C++ should make the distinction.  Also odd since I think it was the 9.4 compiler that first started warning about these things.  ???

I realize I didn't help much but that at least should explain the *normal* reasons you would see that warning.  :-)

stephen

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Trouble compiling myMacheaders CW 9.5 OS 10.4 (From: Bruce Coughlin <email@hidden>)

  • Prev by Date: Simple Core Audio program help
  • Next by Date: Panther CoreAudio SDK and gcc 4.0
  • Previous by thread: Re: Trouble compiling myMacheaders CW 9.5 OS 10.4
  • Next by thread: Re: Trouble compiling myMacheaders CW 9.5 OS 10.4
  • Index(es):
    • Date
    • Thread