how to link libraries

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
gaituc
Blank Cone
Blank Cone
Posts: 11
Joined: 20 Jul 2004 18:57

how to link libraries

Postby gaituc » 13 Mar 2005 02:27

Hi, I've created a new module in VLC, I've compiled and all works. But now I have to add some new functionalities, and to do so I need to use some libraries which are not contained in VLC. What can I do to link external libraries?
Gaituc

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 13 Mar 2005 15:58

study configure.ac

look for instance for something like the ogg header check.
dnl
dnl ogg demux plugin
dnl
AC_ARG_ENABLE(ogg,
[ --enable-ogg Ogg demux support (default enabled)])
if test "${enable_ogg}" != "no"
then
AC_CHECK_HEADERS(ogg/ogg.h, [
AC_CHECK_LIB( ogg, oggpack_read, [
VLC_ADD_PLUGINS([ogg])
if test "${enable_sout}" != "no"; then
VLC_ADD_PLUGINS([mux_ogg])
fi
VLC_ADD_LDFLAGS([ogg mux_ogg],[-logg])])
],[])
fi


this says.
if --enable-ogg is specified
then
check for the ogg/ogg.h header presence in the standard include directories
check for the oggpack_read function in the ogg library in the standard lib directories (unrequired for you case prop. but this can be done to ensure this spefic required function is present)
If all this is OK, then add the VLC ogg module to the list of VLC modules to be compiled
[skip sout stuff]
Add the linker flag -logg if we compile the ogg and/or the mux_ogg vlc modules


after changing configure.ac you need to run the bootstrap script and reconfigure/compile VLC.

See also the file HACKING in the vlc sources.
Don't use PMs for support questions.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 13 guests