emoon / minifb

MiniFB is a small cross platform library to create a frame buffer that you can draw pixels in

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile failure on MacOSX

aviks opened this issue · comments

I'm using xcode 10.12 on x86_64, and getting the following error. This code was seemingly introduced in 8fc7dd9

[11:39:08] /workspace/srcdir/minifb/src/macosx/OSXView.m:357:20: error: unknown class name 'NSAttributedStringKey'; did you mean 'NSAttributedString'?
[11:39:08] - (nonnull NSArray<NSAttributedStringKey> *)validAttributesForMarkedText {
[11:39:08]                    ^~~~~~~~~~~~~~~~~~~~~
[11:39:08]                    NSAttributedString
[11:39:08] /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/AppKit.framework/Headers/NSStatusItem.h:13:8: note: 'NSAttributedString' declared here
[11:39:08] @class NSAttributedString;
[11:39:08]        ^
[11:39:08] /workspace/srcdir/minifb/src/macosx/OSXView.m:357:20: error: type argument 'NSAttributedString' must be a pointer (requires a '*')
[11:39:08] - (nonnull NSArray<NSAttributedStringKey> *)validAttributesForMarkedText {
[11:39:08]                    ^
[11:39:08]                                          *
[11:39:08] 2 errors generated.

https://developer.apple.com/documentation/foundation/nsattributedstring/key

availability macOS 10.13+

Is there any appetite to support 10.12 at all?

I tried to fix it but I cannot check it because I don't have a macOS 10.12 machine. Could you please check it?

I can confirm that this builds successfully with OSX 10.12 now.