Coder Social home page Coder Social logo

Comments (9)

oleksandrh324110 avatar oleksandrh324110 commented on June 16, 2024 3

Finally fixed it.
As i understood, since the last macos update, developers now also need to link -framework QuartzCore on linking stage,
so we can say that for today, it's not enough to link only these -framework Cocoa -framework OpenGL -framework IOKit

from glfw.

dougbinks avatar dougbinks commented on June 16, 2024

See:

https://www.glfw.org/docs/latest/build_guide.html#build_link_osx

Also you might find it easier to use this cmake starter to generate your makefile or XCode project:

https://github.com/juliettef/GLFW-CMake-starter

from glfw.

oleksandrh324110 avatar oleksandrh324110 commented on June 16, 2024

It looks like Apple has changed some code in their Cocoa library so GLFW tries to call wrong function.
Maybe GLFW needs some, hotfix?, for this problem ?

from glfw.

dougbinks avatar dougbinks commented on June 16, 2024

Have you tried cloning the source from git and then using CMake to build GLFW with tests and examples, or alternatively using the GLFW-CMake-starter and following the instructions in the readme to build?

from glfw.

oleksandrh324110 avatar oleksandrh324110 commented on June 16, 2024

Yes. I added the glfw repo as a submodule and successfully compiled it with cd lib/glfw && cmake . && make
Screenshot 2024-04-26 at 14 31 39

But the problems starts while linking

Also i tried to build some examples and got the same linking error:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_CAMetalLayer", referenced from:
       in libglfw3.a[21](cocoa_window.m.o)
ld: symbol(s) not found for architecture arm64

from glfw.

oleksandrh324110 avatar oleksandrh324110 commented on June 16, 2024

It's something about cocoa_window.m file in glfw

from glfw.

dougbinks avatar dougbinks commented on June 16, 2024

If you have successfully compiled GLFW with cmake and make then you should also have compiled and linked the tests and examples, so the problem is not with linking to GLFW in general but how you are linking to it. So you should see there are test executables built in the tests folder, and examples in the examples folder.

As mentioned you could check the documentation on how to compile and link to GLFW on MacOS, or use the GLFW-CMake-starter. If either of these fail then let us know here along with the details.

from glfw.

oleksandrh324110 avatar oleksandrh324110 commented on June 16, 2024

Also note that, i guess, ALL latest versions of macos (for example: BigSur, Monterey, Ventura) need this additional framework while linking (since i downgraded macos from Sonoma to BigSur and the problem still was there:( )

Would be pretty lovely if some contributor updates information about this at https://www.glfw.org/docs/latest/build_guide.html#build_link_osx

from glfw.

oleksandrh324110 avatar oleksandrh324110 commented on June 16, 2024

I see there's some guy who has already fixed this in documentation coming with sources but not on the website (since last website update was on Fri Feb 23 2024)

from glfw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.