[vlc-devel] Creating a module
Alexandre Janniaux
ajanni at videolabs.io
Fri Mar 6 09:25:45 CET 2020
Hi,
If you modify modules/control/Makefile.am, you probably want
to add your module in control_LTLIBRARIES instead. Also if
you don't have CFLAGS or LDFLAGS, don't set them, automake
will either use AM_CFLAGS and CFLAGS or use
your_target_CFLAGS and CFLAGS depending on what you defined.
The error here is that you try to add your plugin libtool
library in a variable that doesn't exist yet (not set with
= before like the message says).
Regards,
--
Alexandre Janniaux
Videolabs
On Thu, Mar 05, 2020 at 10:40:39PM -0500, John Hanks wrote:
> I'm trying to learn how to add modules to the vlc player. I'm new to
> working with vlc and this mailing list seemed to be the closest match for
> what I was looking for (I did not see one specifically referencing
> 'modules'). If I am posting this to the wrong list, please excuse my
> ignorance and point me to the correct place.
>
> I tried following the instructions on the page
> 'https://wiki.videolan.org/Hacker_Guide/How_To_Write_a_Module/'. I copied
> the code at the top into hello.c and put the file in the modules/control
> directory.
>
> Following the instructions under 'Compiling your module', I added the
> following lines to Makefile.am in the same directory:
>
> libhello_plugin_la_SOURCES= hello.c
> libhello_plugin_la_CFLAGS= $(AM_CFLAGS)
> libhello_plugin_la_LIBADD= $(AM_LIBADD)
> libhello_plugin_la_DEPENDENCIES=
> # Always compile the hello module:
> libvlc_LTLIBRARIES+= libhello_plugin.la When I go back to the 'top' and run
> 'make', I get these errors: make[2]: Entering directory
> '/home/vsi/code/vlc3/vlc-3.0.8/modules' cd .. && /bin/bash
> /home/vsi/code/vlc3/vlc-3.0.8/autotools/missing automake-1.16 --foreign
> modules/Makefile modules/control/Makefile.am:76: error: libvlc_LTLIBRARIES
> must be set with '=' before using '+=' modules/Makefile.am:32:
> 'modules/control/Makefile.am' included from here
> modules/control/Makefile.am:76: error: 'libvlc_LTLIBRARIES' is used but
> 'libvlcdir' is undefined modules/Makefile.am:32:
> 'modules/control/Makefile.am' included from here
> modules/control/Makefile.am:71: warning: variable
> 'libhello_plugin_la_SOURCES' is defined but no program or
> modules/control/Makefile.am:71: library has 'libhello_plugin_la' as
> canonical name (possible typo) modules/Makefile.am:32:
> 'modules/control/Makefile.am' included from here
> modules/control/Makefile.am:73: warning: variable
> 'libhello_plugin_la_LIBADD' is defined but no program or
> modules/control/Makefile.am:73: library has 'libhello_plugin_la' as
> canonical name (possible typo) modules/Makefile.am:32:
> 'modules/control/Makefile.am' included from here
> modules/control/Makefile.am:74: warning: variable
> 'libhello_plugin_la_DEPENDENCIES' is defined but no program or
> modules/control/Makefile.am:74: library has 'libhello_plugin_la' as
> canonical name (possible typo) modules/Makefile.am:32:
> 'modules/control/Makefile.am' included from here Makefile:12544: recipe for
> target 'Makefile.in' failed It seems to have an error with every line I
> added except the comment. What am I doing wrong? John
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list