I happened to notice that this header file uses #import <Cocoa/Cocoa.h> This is the first time I came across the preprocessor directive #import; the first thing I found about it is this Q&A suggesting it's not portable nor standard C: https://stackoverflow.com/q/39280248/3576984 On the other hand, this exact invocation seems pretty common on GitHub https://github.com/search?l=C&q=%22%23import+%3CCocoa%2FCocoa.h%3E%22&type=Code I don't see much in the way of relevant documentation for Cocoa besides stuff like this page from 2001: http://cocoadevcentral.com/articles/000031.php Is this something that should be updated to use #include? Other packages appear to have done so, e.g. from GitHub: https://github.com/search?q=%22%23include+cocoa%2Fcocoa.h%22&type=code Michael Chirico [[alternative HTML version deleted]]
On Mon, Oct 19, 2020 at 5:02 AM Michael Chirico <michaelchirico4 at gmail.com> wrote:> > I happened to notice that this header file uses > > #import <Cocoa/Cocoa.h> > > This is the first time I came across the preprocessor directive #import; > the first thing I found about it is this Q&A suggesting it's not portable > nor standard C:The Cocoa API is in Objective-C and #import is part of Objective-C. [...]> I don't see much in the way of relevant documentation for Cocoa besides > stuff like this page from 2001:Apple has the Cocoa docs, e.g. at https://developer.apple.com/documentation/foundation Gabor [...]