[vlc-devel] Help with linking to libvlc dll

Mark Mitchell markmitchell at cynmark.com
Thu Feb 21 01:53:29 CET 2008


Hello all -

I forgot -  I am running under windows xp home sp2.  I am compiling using
cygwin under eclipse environment.

thanks

Mark

-----Original Message-----
From: vlc-devel-bounces at videolan.org
[mailto:vlc-devel-bounces at videolan.org]On Behalf Of Mark Mitchell
Sent: Wednesday, February 20, 2008 4:39 PM
To: Mailing list for VLC media player developers
Subject: [vlc-devel] Help with linking to libvlc dll


Hello again -

Does anyone out there know how to make the connection between the libvlc dll
and my source program.  I looked on the libvlc tutorial and example pages
and cannot find this.  I am new to this and don't know how to proceed.  I
have made a small hello world test program that contains calls to some
libvlc functions.  It compiles fine but the link phase cannot resolve the
dll based functions.  No where on the website could I find how this is done.
I have included code and the progress output below.

Another question.  I have managed to build the vlc executable from source
and have installed it using the zip version of the installer (great thanks
to Fafael Carre).  Now I want to communicate with the running version of vlc
from my small hello world program (just to confirm I can do it) through the
libvlc.dll.  Is this even possible?  Is there a better or simpler way? I
gathered from the website that this was the way to do it.

How does my program (which was generated by cygwin ultimately which I
believe is linux based), even run in a windows environment and furthermore
talk to a windows program (dll?) in what environment do I invoke it when it
does build?

clearly I am new to this and am muddling my way through.


Oe last question -  Is there a way to search the mailing lists for keywords
or even see the threads.  I have not been able to find this.  Just a listing
of the archives which is not very useful (no subjects).


Any help would be a great help.

below is the code.

Thanks

Mark


/*
 ===========================================================================
=
 Name        : hello.c
 Author      : mark
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ===========================================================================
=
 */

#include <stdio.h>
#include <stdlib.h>
#include <vlc/libvlc.h>

int main(void) {
	/* to catch problems */
	static libvlc_exception_t ex;
    if (libvlc_exception_raised (&ex))
    {
        fprintf (stderr, "Exception: %s\n",
                 libvlc_exception_get_message (&ex));
        exit(1);
    }

    libvlc_exception_clear (&ex);

	puts("Hello World!!!"); /* prints Hello World!!! */
	return EXIT_SUCCESS;
}











**** Build of configuration Debug for project hello world 6 ****

make all
Building file: ../src/hello world 6.c
Invoking: Cygwin C Compiler
gcc -I"C:\cygwin\home\Mark_Mitchell\vlc-trunk\include" -O0 -g3 -Wall -c -fme
ssage-length=0 -MMD -MP -MF"src/hello world 6.d" -MT"src/hello\ world\
6.d" -o"src/hello world 6.o" "../src/hello world 6.c"
Finished building: ../src/hello world 6.c

Building target: helloworld6.exe
Invoking: Cygwin C Linker
gcc  -o"helloworld6.exe"  ./src/hello\ world\ 6.o
./src/hello world 6.o: In function `main':
/cygdrive/c/Documents and Settings/Mark Mitchell/workspace2/hello world
6/Debug/../src/hello world 6.c:18: undefined reference to
`_libvlc_exception_raised'
/cygdrive/c/Documents and Settings/Mark Mitchell/workspace2/hello world
6/Debug/../src/hello world 6.c:20: undefined reference to
`_libvlc_exception_get_message'
/cygdrive/c/Documents and Settings/Mark Mitchell/workspace2/hello world
6/Debug/../src/hello world 6.c:25: undefined reference to
`_libvlc_exception_clear'
collect2: ld returned 1 exit status
make: *** [helloworld6.exe] Error 1

_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
http://mailman.videolan.org/listinfo/vlc-devel




More information about the vlc-devel mailing list