[vlc-devel] Re: problems linking an using mediacontrol API

Juan Manuel Lopez Baio jmbaio at gmail.com
Fri May 18 21:07:11 CEST 2007

On 5/18/07, Pierre d'Herbemont <pdherbemont at free.fr> wrote:
> On 18 mai 07, at 20:05, Juan Manuel Lopez Baio wrote:
> I think it should work as is. But I might be wrong, if so just
> provide a drawable to mediacontrol.
> > #include <vlc/vlc.h>
> > #include <vlc/libvlc.h>
> > #include <vlc/mediacontrol.h>
> >
> > int main(int argc, char **argv)
> > {
> >
> >       mediacontrol_Exception ex;
> >        mediacontrol_exception_init(&ex);
> >       mediacontrol_Instance* ins = mediacontrol_new(argv,&ex);
> ins = mediacontrol_new( argc, argv, &ex );
> But I am sure that you want to pass directly argv[0] as a libvlc arg.

Reading the API doc I saw tha mediacontrol_new had three arguments,
but when a looked at the code I had downloaded (VLC version 0.8.6a) I
saw that it only got to (of course, it wouldn't compile otherwise):
the char** and the mediacontrol_Exception*. It seemed odd.

> I suggest you to look at the Mac OS X Framework code as an entry point:
> http://git.videolan.org/cgi-bin/gitweb.cgi?p=vlc-
> soc.git;a=blob;f=extras/MacOSX/Framework/Sources/
> VLCVideoView.m;hb=56dbdfccb979105d87f20ba60002c8b778590b40
> Pierre.

ok, now, with that same code, I'm trying

g++ jdplayer.cpp -O0 -g3 -o jjdplayer `vlc-config --cflags --libs vlc` -lvlc
and also
g++ jdplayer.cpp -O0 -g3 -o jjdplayer `vlc-config --cflags vlc --libs vlc` -lvlc

both gave me:

jdplayer.cpp:32: undefined reference to `mediacontrol_new'

I also had to #undef __VLC__, otherwise it would cry for an inexistent
I'm on a Debian box with gcc 4.1

any idea?


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list