nariakiiwatani/ofxNDI

osx library not loaded

Closed this issue · 7 comments

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

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?

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.

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).

yeah that made the app run.
thanks so much.

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

Perfect, it is working now. Big thanks!

Thanks to @2bbb !
Closing.