Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dyld: Library not loaded: EjectKit #6

Closed
edwardloveall opened this issue Nov 10, 2016 · 2 comments
Closed

dyld: Library not loaded: EjectKit #6

edwardloveall opened this issue Nov 10, 2016 · 2 comments

Comments

@edwardloveall
Copy link
Contributor

So I build the project, navigate to the build directory in the terminal, then run ./eject. This message spits out at me:

dyld: Library not loaded: @rpath/EjectKit.framework/Versions/A/EjectKit
  Referenced from: /Users/edwardloveall/Library/Developer/Xcode/DerivedData/Eject-gcyocjdokcfabqevoqmiqqzavoxx/Build/Products/Debug/eject
  Reason: image not found
zsh: abort

This is opposed to the generic help message that spits out into the xcode log when I build and run.

@edwardloveall
Copy link
Contributor Author

This is fixed either by moving frameworks so that they are one level above the binary or changing the rpath with install_name_tool. When the project is built from xcode, this structure is created by the app bundle.

The directory structure could also look like this:

└── eject
    ├── bin
    │   └── eject
    ├── Frameworks
    │   ├── EjectKit.framework
    │   ├── libswiftAppKit.dylib
    │   ├── libswiftCore.dylib
    │   ├── libswiftCoreData.dylib
    │   ├── libswiftCoreGraphics.dylib
    │   ├── libswiftCoreImage.dylib
    │   ├── libswiftDarwin.dylib
    │   ├── libswiftDispatch.dylib
    │   ├── libswiftFoundation.dylib
    │   ├── libswiftIOKit.dylib
    │   ├── libswiftObjectiveC.dylib
    │   ├── libswiftQuartzCore.dylib
    │   ├── libswiftSwiftOnoneSupport.dylib
    │   └── libswiftXPC.dylib

I'd recommend against copying the main binary out of the app bundle so people don't have to move frameworks around.

@KingOfBrian
Copy link
Contributor

Thanks again for the help @edwardloveall !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants