The GLFW library runs fine in an older project (created in XCode 7.x). I used the same method to add library directory and includes files, but this time it prompts a run time error, the error message is:
dyld: Library not loaded: lib/libglfw.3.dylib
Referenced from: /Users/BlacKay/Documents/Projects/OpenGL Tutorials/OpenGL_tutorial_anton/build/Debug/Learn_OpenGL
Reason: image not found
Program ended with exit code: 9
If someone can point what the potential problem is, that'd be great. Thanks~
Related
After updating to Xcode 11.4 suddenly the following error is being thrown from the debugger when my application begins running on a physical iPhone connected to Xcode.
dyld: warning: could not load inserted library '#executable_path/Frameworks/libclang_rt.asan_ios_dynamic.dylib' into hardened process because no suitable image found. Did find:
/private/var/containers/Bundle/Application/40EE2455-9E2E-4259-A997-F439F67E9CE5/sample-app!.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib: code signature invalid for '/private/var/containers/Bundle/Application/40EE2455-9E2E-4259-A997-F439F67E9CE5/sample-app!.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib'
/private/var/containers/Bundle/Application/40EE2455-9E2E-4259-A997-F439F67E9CE5/sample-app!.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib: code signature invalid for '/private/var/containers/Bundle/Application/40EE2455-9E2E-4259-A997-F439F67E9CE5/sample-app!.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib'
/private/var/containers/Bundle/Application/40EE2455-9E2E-4259-A997-F439F67E9CE5/sample-app!.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib: stat() failed with errno=1
dyld: Library not loaded: #rpath/libclang_rt.asan_ios_dynamic.dylib
Referenced from: /private/var/containers/Bundle/Application/40EE2455-9E2E-4259-A997-F439F67E9CE5/sample-app!.app/HeadPop!
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/40EE2455-9E2E-4259-A997-F439F67E9CE5/sample-app!.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib: code signature invalid for '/private/var/containers/Bundle/Application/40EE2455-9E2E-4259-A997-F439F67E9CE5/sample-app!.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib'
Can anyone please explain to me what this library libclang_rt.asan_ios_dynamic.dylib is ?
And how to recover from this issue?
In my case the exception (in Xcode 11.4) was:
dyld: could not load inserted library '.../Build/Products/Debug-iphonesimulator/MyApp.app/PlugIns/UnitTests.xctest/Frameworks/libclang_rt.asan_iossim_dynamic.dylib' because image not found
And the clue in a comment above is right: the issue was caused by thread_sanitizer: true in fastlane configuration for 13.4.1 device. Same flag for 12.4 device did not cause any problem.
I didn't find a better solution than removing this flag.
I also had this issue with the "Undefined Behavior Sanitizer" checked. Seems like this may occur with any sanitizer. Unchecking resolved the issue.
Find the Sanitizer checkboxes in Product > Scheme > Edit Scheme > Run > Diagnostics
When I ran a C++ application in XCode on MacOS 10.14 that uses OpenGL and Assimp, everything compiled, but I got this error
dyld: Library not loaded: #rpath/libIrrXMLd.dylib
Referenced from: /usr/local/lib/libassimpd.5.dylib
Reason: image not found
Program ended with exit code: 9
Searched on Google and seems like no one has had this problem before
I've compiled my SFML program with g++ and that seems to be working fine now (had issues with it previously), however when I try to run the resulting output, I get the following error message:
dyld: lazy symbol binding failed: Symbol not found: __ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE
Referenced from: /Users/fabricecastel/Work/Game_Projects/SFML_tutorials/./a.out
Expected in: /usr/local/lib/libsfml-graphics.2.dylib
dyld: Symbol not found: __ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE
Referenced from: /Users/fabricecastel/Work/Game_Projects/SFML_tutorials/./a.out
Expected in: /usr/local/lib/libsfml-graphics.2.dylib
Trace/BPT trap: 5
I've checked the folder in question and libsfml-graphics.2.dylib isn't missing. Besides that I'm at a total loss as to what the issue is and how I'm supposed to fix it. Seems to me that the RenderWindow symbol isn't included in the dylib but it should be. We're talking SFML 2.1 here, not some obscure amateur project. What's up with that?
The only way I could reproduce these errors is when GCC and Clang version of SFML are mixed. Here are two procedures that create the same errors.
First procedure
install the GCC version
compile your application (successfully)
install the Clang version
run your application
Second procedure
install the Clang version
compile your application (successfully)
install the GCC version
run your application
When you install another runtime, you need to carefully rebuild from scratch your application. That is, remove the final binary as well as any .o files before compiling.
I compiled the QJSon code from the command line and it generated a dylib (libqjson.0.7.1.dylib) I then added this file as an external dependency to one of the libraries in my app. (using Xcode 4.3 as the IDE) everything seems to compile correctly. When i go to run the app i get the following error:
dyld: Library not loaded: /Users/shawneckley/Mac_Dev/Development/build/thirdparty/qjson/src/lib/libqjson.0.dylib
Referenced from: /Users/shawneckley/Mac_Dev/Development/Build/bin/Debug/libstonewedgeaccountandclient.dylib
Reason: image not found
(lldb)
any idea why this could be happening?
I am building a command line tool .I have added Flac.framework in my xcode project and I am running it for 32 bit mac. But It is giving error after running
dyld: Library not loaded:
#executable_path/../Frameworks/FLAC.framework/Versions/A/FLAC
Referenced from:
/Users/Library/Developer/Xcode/DerivedData/Flac_decoder-dbwsvotpcvjmwceheldbxndflbig/Build/Products/Debug/Flac_decoder
Reason: image not found
I have included Header search Path and framework path and still giving error. How to resolve this ?