glew
glew copied to clipboard
dyld[23765]: Library not loaded: /opt/homebrew/opt/glew/lib
I am trying to import glew in my opengl project, The build succeeds but there is a run time error
dyld[1206]: Library not loaded: /opt/homebrew/opt/glew/lib/libGLEW.2.2.dylib
Referenced from: /Users/mahesh/Library/Developer/Xcode/DerivedData/shaders_tutorial-dmpbkihfzacdojeludtugemxgahg/Build/Products/Debug/shaders_tutorial
Reason: tried: '/Users/mahesh/Library/Developer/Xcode/DerivedData/shaders_tutorial-dmpbkihfzacdojeludtugemxgahg/Build/Products/Debug/libGLEW.2.2.dylib' (no such file),
'/usr/lib/system/introspection/libGLEW.2.2.dylib' (no such file), '/opt/homebrew/opt/glew/lib/libGLEW.2.2.dylib' (code signature in
<5B17918D-3F6B-34E1-AB68-489FA9ECB892> '/opt/homebrew/Cellar/glew/2.2.0_1/lib/libGLEW.2.2.0.dylib' not valid for use in
process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)),
'/usr/local/lib/libGLEW.2.2.dylib' (no such file), '/usr/lib/libGLEW.2.2.dylib' (no such file),
'/Users/mahesh/Library/Developer/Xcode/DerivedData/shaders_tutorial-dmpbkihfzacdojeludtugemxgahg/Build/Products/Debug/libGLEW.2.2.0.dylib' (no such file),
'/usr/lib/system/introspection/libGLEW.2.2.0.dylib' (no such file), '/opt/homebrew/Cellar/glew/2.2.0_1/lib/libGLEW.2.2.0.dylib' (code signature in <5B17918D-3F6B-34E1-AB68-489FA9ECB892> '/opt/homebrew/Cellar/glew/2.2.0_1/lib/libGLEW.2.2.0.dylib' not valid
for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)),
'/usr/local/lib/libGLEW.2.2.0.dylib' (no such file), '/usr/lib/libGLEW.2.2.0.dylib' (no such file)
(lldb)
I have linked the following binaries in Xcode
I have also included the GL libraries in my incliude folder which is added to headers search Path in xcode
I am using a m1 mac,
Let me know if you need any further info
Appears to be a Mac security feature? https://developer.apple.com/forums/thread/695481
-- Nigel
thanks for your response @nigels-com. Is there a way to deal with this issue?
Might be worth updating your homebrew install. https://github.com/Homebrew/brew/issues/9082
I have the same issue in Xcode configured Opencv 4.5.5_2.
Unfortunately, upgrading homebrew did not make a difference and the issue persists.
There is some troubleshooting information on the Homebrew discussions: https://github.com/Homebrew/discussions/discussions/3124
I'm not able to reproduce this, my Mac is not as recent.