djnowak@luna.dpl.scg.hac.com (David Nowak) (07/10/89)
I have been using MPW Pascal 3.0 for some time now. Recently I defined a unit that used the {PInterface}Windows.p file. I used the: {$IFC UNDEFINED UsingIncludes} {$SETC UsingIncludes := 0} {$ENDC} {$IFC NOT UsingIncludes} UNIT Globals; INTERFACE {$ENDC} {$IFC UNDEFINED UsingGlobals} {$SETC UsingGlobals := 1} {$I+} . . . {$IFC UNDEFINED UsingWindows} {$I $$Shell(PInterfaces)Windows.p} {$ENDC} {$SETC UsingIncludes := GlobalsIncludes} prototype header to create a symbol table resource fork in my global unit file full which then could be used in other program segments that I am writing. Upon compilation of this new unit I recieved an error message: ### PASCAL - Error 177 Unsatisfied forward declaration for Function GETGRAYRGN # ? It seems that the Windows.p that the GetGrayRgn function has no corresponding INLINE address declaration: FUNCTION GetGrayRgn: RgnHandle; Does anyone know this value so I can proceed with compiling my Globals unit? And why did Apple leave out this address declaration? Thanks in advance. Dave Nowak djnowak@luna.dpl.scg.hac.com
Greg@AppleLink.Apple.Com (Greggy) (07/11/89)
In article <4313@hacgate.scg.hac.com> djnowak@luna.dpl.scg.hac.com (David Nowak) writes: > ... > [ David complains about an error when he includes > Windows.p in his own unit ] > ... > ### PASCAL - Error 177 Unsatisfied forward declaration for Function > GETGRAYRGN > ... > It seems that the Windows.p that the GetGrayRgn function has > no corresponding INLINE address declaration: > > FUNCTION GetGrayRgn: RgnHandle; > > Does anyone know this value so I can proceed with compiling my Globals > unit? > And why did Apple leave out this address declaration? > > Thanks in advance. Apple didn't leave out any declarations. GetGrayRgn is implemented with glue, not INLINEs, thus the code is supplied at link time from the Interface.o file. When you include Windows.p, GetGrayRgn ends up having a declaration in the INTERFACE, but no code in the IMPLEMENTATION section of your unit. Since you have an IMPLEMENTATION section, Pascal complains when it can't find the code for the declared function. > Dave Nowak > djnowak@luna.dpl.scg.hac.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Greg Marriott + AppleLink: Greg + + Just Some Guy + + + "My phone is always busy" + Internet: Greg@AppleLink.Apple.Com + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Apple Computer, Inc. + + 20525 Mariani Ave, MS-46z, Cupertino, CA 95014 + + (408)974-busy + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
keith@Apple.COM (Keith Rollin) (07/17/89)
In article <4313@hacgate.scg.hac.com> djnowak@luna.dpl.scg.hac.com (David Nowak) writes: > > It seems that the Windows.p that the GetGrayRgn function has >no corresponding INLINE address declaration: > > FUNCTION GetGrayRgn: RgnHandle; > >Does anyone know this value so I can proceed with compiling my Globals >unit? >And why did Apple leave out this address declaration? > Dave, Everything should be OK. There is no INLINE instruction after the declaration because there is no trap for GetGrayRgn. It is implemented by a routine in "{Libraries}Interface.o". ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions