Anyone used libvlc on Mac?

核能气质少年 提交于 2019-12-12 21:23:43

问题


Edit

I've been able to simplify the reproduction of the error:

When trying to build this sample:

$ cc example.c -arch i386 -lvlc.2 -L/Applications/VLC.app/Contents/MacOS/lib/  -I/Applications/VLC.app/Contents/MacOS/include/ -o example
$ ./example 
dyld: Library not loaded: @loader_path/lib/libvlc.2.dylib
  Referenced from: /Users/francis/src/playground/libvlc/./example


Original Post

I am experiencing the following behavior:

  • Create new XCode project (Cocoa or command line tool)
  • Link with libvlc.2.dylib found in /Applications/VLC.app/Contents/MacOS/lib
  • Run the application
  • => Crashes with stack-trace pointing pointing to __dyld_dyld_fatal_error at the top and __dyld__dyld_start at the bottom.

What am I doing wrong here? Maybe I need to link with a fresh VLC build, but I haven't yet succeeded building it on Snow Leopard and the MacPort doesn't work as well (fails during build phase).

Can anyone point me in the right direction for getting it to work?


回答1:


Check with otool -L if your programm is correctly linked with all your libs.

relink every dylib with install_name_tools



来源:https://stackoverflow.com/questions/1756062/anyone-used-libvlc-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!