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

This forum is about all development around libVLC.
pier25
New Cone
New Cone
Posts: 1
Joined: 03 Mar 2012 04:31

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

Postby pier25 » 03 Mar 2012 04:47

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 03 Mar 2012 07:19

All.
Depends on the linker configuration, please check your OS documentation.
No.
Depends how you setup your build system, nobody can answer this here.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

vseryakov
New Cone
New Cone
Posts: 6
Joined: 05 Jan 2008 00:20

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

Postby vseryakov » 09 Mar 2012 17:07

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 16 guests