Prod. Jacksxn
Prod. Jacksxn

Reputation: 63

Trying to setup Xcode with OpenGL

I've been trying to setup Xcode with OpenGL, but I can't get it to work.

I have been getting this error every time:

dyld: Library not loaded: /usr/local/opt/glfw/lib/libglfw.3.dylib
  Referenced from: /Users/parisjackson-newman/Library/Developer/Xcode/DerivedData/GLFW_OpenGL-fjibdenxheioomgsseembfpbmeih/Build/Products/Debug/GLFW OpenGL
  Reason: no suitable image found.  Did find:
    /usr/local/opt/glfw/lib/libglfw.3.dylib: code signature in (/usr/local/opt/glfw/lib/libglfw.3.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
    /usr/local/lib/libglfw.3.dylib: code signature in (/usr/local/lib/libglfw.3.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
    /usr/local/Cellar/glfw/3.3.2/lib/libglfw.3.3.dylib: code signature in (/usr/local/Cellar/glfw/3.3.2/lib/libglfw.3.3.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
(lldb) 

I used home-brew to install glfw and glew. And the code I am running is the standard window code from the glfw.org website

Upvotes: 4

Views: 1367

Answers (2)

quaternionboy
quaternionboy

Reputation: 361

Seems root issue

  1. install glfw from a package manager like brew brew install glfw

  2. xcode search headers path usr/local/include

  3. xcode search libraries path usr/local/lib

Upvotes: 1

Jef
Jef

Reputation: 350

Go to your Project Navigator and select your project.

Then, go to the Hardened Runtime section under the Signing & Capabilities tab.

Click the checkbox for Disable Library Validation.

Once this is done, you should be able to run your project.

enter image description here

Upvotes: 6

Related Questions