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

osx library not loaded #1

Closed
ghost opened this issue Apr 24, 2018 · 7 comments
Closed

osx library not loaded #1

ghost opened this issue Apr 24, 2018 · 7 comments

Comments

@ghost
Copy link

ghost commented Apr 24, 2018

Hi i tried your addon but i cant get it running on osx. It compiles fine but it is missing the library when i try to run.

dyld: Library not loaded: @rpath/libndi.3.dylib

I tried to add it to the run script with:
copy libndi.3.dylib to package target directory so self contained
cp -f ../../../addons/ofxNDI/libs/NDI/lib/osx/libndi.3.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libndi.3.dylib";

Optional - seems to work with or without it - change orig path of @executable_path/libndi.3.dylib to target directory

install_name_tool -change ./libndi.3.dylib @executable_path/libndi.3.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME";

but still not working. Can you give me a hint?
Thanks in advance

@nariakiiwatani
Copy link
Owner

I'm sorry I didn't notice your message till today.

I tried to reproduce the problem but couldn't.
One thing to say, the message dyld: Library not loaded: .3.dylib is a bit strange because correct library name is libndi.3.dylib.
I doubt something is wrong with your xcodeproj file.
Could you delete .app file you built and regenerate project files by ProjectGenerator?

@stephanschulz
Copy link

I get a similar error.
comping works fine but when trying to start it has the following message:

dyld: Library not loaded: @rpath/libndi.3.dylib
  Referenced from: /Applications/openFrameworks-master/addons/ofxNDI/example-sender/bin/example-sender.app/Contents/MacOS/example-sender
  Reason: image not found
(lldb) 

I'm on OSX 10.12.6 with OF 0.10.0 in voce 9.2 beta.

seems to me some dylib needs to be linked and automatically included in to the compiled app.

@nariakiiwatani
Copy link
Owner

https://github.com/2bbb/ofxNDI/tree/48616bf6a51dd1abfe2a30608390b95dc97e5132

How does it go if following the readme of this fork?
Your environment is more similar to his than me (mentioned here).

@stephanschulz
Copy link

yeah that made the app run.
thanks so much.

@nariakiiwatani
Copy link
Owner

@UnivateBV
now it may be fixed.
please check it.

@ghost
Copy link
Author

ghost commented May 24, 2018

Perfect, it is working now. Big thanks!

@nariakiiwatani
Copy link
Owner

Thanks to @2bbb !
Closing.

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