On Feb 17, 2019, at 15:33, Riccardo Mottola wrote:
> Hi,
>
> I am trying to port ArcticFox to 10.5 Leopard.
>
> I get this error:
>
> 52:30.98 /Users/multix/code/Arctic-Fox/gfx/2d/PathCG.cpp:313:21: error: use
> of undeclared identifier 'CGContextCopyPath'; did you mean
> 'CGContextClosePath'?
> 52:30.98 CGPathRef sPath = CGContextCopyPath(cg);
>
>
> However, according to documentation, this function should exist since 10.2,
> it is very old!:
> https://developer.apple.com/documentation/coregraphics/1455397-cgcontextcopypath?language=objc
>
> I tried to look, I find it inside the libary:
>
> Binary file
> ApplicationServices.framework/Versions/Current/Frameworks/CoreGraphics.framework/Versions/Current/CoreGraphics
> matches
>
>
> but not in the headers!
>
> Any of you has seen something like that? Could this be an error in my
> headers, the library being missing?
I agree, I don't see CGContextCopyPath described in the 10.5 SDK headers.
I've encountered this in other situations. Apple documentation's notion of when
a symbol became available seems to refer to the libraries, not necessarily the
headers. Sometimes they introduce a function in an OS version but don't
publicly announce it (or add it to the SDK) until later. So you could either
use the 10.6 SDK, or else add the needed definitions from the 10.6 SDK to your
project headers somewhere (when using an earlier SDK).