using libvlc and trunk version

*nix specific usage questions
contremaitre
Blank Cone
Blank Cone
Posts: 27
Joined: 16 May 2008 11:49

using libvlc and trunk version

Postby contremaitre » 27 May 2008 15:02

Hello,

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);
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 :
#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 ?? ()
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)

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
core.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'
[...]
Thank you

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: using libvlc and trunk version

Postby Rémi Denis-Courmont » 28 May 2008 18:56

You need to link libvlccore too if you want to statically link libvlc.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 15 guests