using libvlc and trunk version
Posted: 27 May 2008 15:02
Hello,
I downloaded and compiled latest trunk version of vlc.
Then I am trying to run this simple code :
I have two problems :
If I compile with :
gcc -g -o test test.c -L/home/vlc-0.9.0-git/src/.libs/ -lvlc
I have a segmentation fault at libvlc_new, the backtrace is :
Second problem :
I want to compile with static link and :
gcc -g -o test test.c -L/home/vlc-0.9.0-git/src/.libs/ -lvlc -lpthread -static
I downloaded and compiled latest trunk version of vlc.
Then I am trying to run this simple code :
Code: Select all
char *myargv[] =
{
"/home/vlc_test",
"-vvv"
};
libvlc_exception_t excp;
libvlc_exception_init(&excp);
libvlc_instance_t *inst = libvlc_new (2, myargv, &excp);
If I compile with :
gcc -g -o test test.c -L/home/vlc-0.9.0-git/src/.libs/ -lvlc
I have a segmentation fault at libvlc_new, the backtrace is :
If I remove myargv from libvlc_new it works, so maybe a bug there ? (this works fine with 0.8.6e version of libvlc from ubuntu rep)#0 0xb7e60ccc in ?? () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7e61ab1 in ?? () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7e61c61 in getopt_long () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7d72934 in ?? () from /home/vlc-0.9.0-git/src/.libs/libvlccore.so.0
[...]
#14 0xb7ef53c4 in re_syntax_options () from /lib/tls/i686/cmov/libc.so.6
#15 0xb7ef53c4 in re_syntax_options () from /lib/tls/i686/cmov/libc.so.6
#16 0xb7ef53c4 in re_syntax_options () from /lib/tls/i686/cmov/libc.so.6
[...]
#22 0x00000000 in ?? ()
Second problem :
I want to compile with static link and :
gcc -g -o test test.c -L/home/vlc-0.9.0-git/src/.libs/ -lvlc -lpthread -static
Thank youcore.c:(.text+0x1c8): undefined reference to `libvlc_InternalAddIntf'
/home/vlc-0.9.0-git/src/.libs//libvlc.a(libvlc_la-core.o): In function `libvlc_new':
core.c:(.text+0x215): undefined reference to `libvlc_InternalCreate'
core.c:(.text+0x343): undefined reference to `libvlc_InternalInit'
core.c:(.text+0x379): undefined reference to `vlc_mutex_init'
core.c:(.text+0x381): undefined reference to `vlc_mutex_init'
/home/vlc-0.9.0-git/src/.libs//libvlc.a(libvlc_la-core.o): In function `libvlc_retain':
core.c:(.text+0x44b): undefined reference to `vlc_pthread_fatal'
core.c:(.text+0x47e): undefined reference to `vlc_pthread_fatal'
/home/vlc-0.9.0-git/src/.libs//libvlc.a(libvlc_la-core.o): In function `libvlc_release':
core.c:(.text+0x4fc): undefined reference to `__vlc_mutex_destroy'
core.c:(.text+0x518): undefined reference to `__vlc_mutex_destroy'
core.c:(.text+0x522): undefined reference to `libvlc_InternalCleanup'
core.c:(.text+0x530): undefined reference to `libvlc_InternalDestroy'
core.c:(.text+0x56e): undefined reference to `vlc_pthread_fatal'
core.c:(.text+0x5a3): undefined reference to `vlc_pthread_fatal'
/home/vlc-0.9.0-git/src/.libs//libvlc.a(libvlc_la-core.o): In function `libvlc_get_changeset':
core.c:(.text+0x71): undefined reference to `VLC_Changeset'
[...]