Bonzomatic icon indicating copy to clipboard operation
Bonzomatic copied to clipboard

MacOS build fails

Open vmarkushin opened this issue 5 years ago • 3 comments

I'm getting strange errors when compiling on macOS:

/Users/vmark/dev/Bonzomatic/external/glfw/src/cocoa_init.m:77:5: error: use of undeclared identifier 'NSString'; did you mean 'cString'?
    NSString* appName = nil;
    ^~~~~~~~
    cString

Not sure what can cause this, so I leave the full build.log here.

System info:

  • macOS Catalina 10.15.7
  • Xcode 12.2, build version 12B45b
  • AppleClang 12.0.0.12000032

vmarkushin avatar Nov 22 '20 13:11 vmarkushin

@alkama

Gargaj avatar Nov 22 '20 16:11 Gargaj

I'll have a look now. I actually have upgraded from Catalina to Big Sur so I'll be curious to see how friendly Big Sur is to Bonzomatic compilation and execution. It could do with a fresh recompile anyway since compiling with the latest Xcode on Big Sur will produce a binary that is optimised for both x86 and the new Apple Silicon M1 ARM architecture

sacredbanana avatar Nov 22 '20 17:11 sacredbanana

So, the undeclared NSString thing is just a side effect of the main cause. Since Apple has deprecated OpenGL, certain OpenGL variables and methods are no longer available in the Catalina and higher SDK. One such example of a variable that this project needs is no longer available: https://developer.apple.com/documentation/appkit/nsopenglpfaalphasize Catalina is 10.15 and Big Sur is 11.0. It shows this variable is in the SDK until 10.14. This basially means you'll need Mojave or earlier to compile but I am happy to report Bonzomatic still runs fine on Big Sur.

It is actually GLFW using the no longer available variables and methods. Perhaps there's a new version of GLFW that works? Are we interested in updaring that or have we held back for a reason?

sacredbanana avatar Nov 22 '20 18:11 sacredbanana