Page 1 of 1

using libVlc in a C++ project in Mac OS Xcode

Posted: 03 Mar 2012 04:47
by pier25
Hi

I'd like to try libVlc in a C++ project on Mac OS.

I've seen post that say that I need to link to the dylib files in the VLC.app contents.

I've found those files:
libvlc.5.dylib
libvlc.dylib
libvlccore.5.dylib
libvlccore.dylib

Which one do I have to use?
Can I move that file somewhere else?
Is FFMPEG included in those files?
Will I need to move the header files (.h) too?

Any help is appreciated.

Re: using libVlc in a C++ project in Mac OS Xcode

Posted: 03 Mar 2012 07:19
by RĂ©mi Denis-Courmont
All.
Depends on the linker configuration, please check your OS documentation.
No.
Depends how you setup your build system, nobody can answer this here.

Re: using libVlc in a C++ project in Mac OS Xcode

Posted: 09 Mar 2012 17:07
by vseryakov
Hi

I'd like to try libVlc in a C++ project on Mac OS.

I've seen post that say that I need to link to the dylib files in the VLC.app contents.

I've found those files:
libvlc.5.dylib
libvlc.dylib
libvlccore.5.dylib
libvlccore.dylib

Which one do I have to use?
Can I move that file somewhere else?
Is FFMPEG included in those files?
Will I need to move the header files (.h) too?

Any help is appreciated.
What i ended up doing is this little script to setup temporary app with links to VLC.app

ifeq ($(PLATFORM),Darwin)
CXXFLAGS += $(APP_CUSTOM)
VLC = /opt/local/VLC.app/Contents/MacOS
APPDIR = ../$(APPNAME).app
APPMAC = $(APPDIR)/Contents/MacOS
APPBIN = $(APPMAC)/$(APPNAME)
APP_CUSTOM = $(shell rm -rf $(APPDIR) && mkdir -p $(APPMAC) && ln -s $(VLC)/lib $(APPMAC)/lib && ln -s $(VLC)/plugins $(APPMAC)/plugins && ln -s $(VLC)/share $(APPMAC)/share && ln -s ../../ $(APPDIR)/Contents/Resources && sed -e "s/APPNAME/$(APPNAME)/g" ../pkg/Info.plist >$(APPDIR)/Contents/Info.plist && echo 'APPL????' > $(APPDIR)/Contents/PkgInfo)
endif