Re: porting vdr-plugin-sc from FFdecsa to dvbcsa: undefined symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Am 27.12.2013 11:30, schrieb cedric.dewijs@xxxxxxxxxx:

    This compiles and installs fine, but I see the following
    error in /var/log/syslog when I start VDR
    vdr: [8061] ERROR: /usr/lib/vdr/plugins/libvdr-sc.so.1.7.28:
    undefined symbol: _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s
    vdr: [8118] VDR version 1.7.28 started

I find this odd, because /usr/include/dvbcsa/dvbcsa.h contains
the function prototypes for both dvbcsa_bs_key_free and
dvbcsa_bs_key_s :
void dvbcsa_bs_key_free(struct dvbcsa_bs_key_s *key);
struct dvbcsa_bs_key_s * dvbcsa_bs_key_alloc(void);

But why are they concatenated into one symbol?

Looks like you are using a plain C library with C++. The undefined symbol is a C++ decorated one:

corei7:~ # c++filt _Z18dvbcsa_bs_key_freeP15dvbcsa_bs_key_s
dvbcsa_bs_key_free(dvbcsa_bs_key_s*)
corei7:~ #

It seems like the header files for libdvbcsa are not prepared for C++. So the compiler puts a reference for a C++ decorated symbol into the object file which the linker cannot resolve as the library seems to contain only plain C symbols.

Try to put the #include statements for those header files into an extern C block, like this:

extern "C" {
#include "headerfile.h"
}

This makes the compiler interpret the header file as plain C and -- as a result -- generate plain C symbol references.

Hope this helps.

Bye.
--
Dipl.-Inform. (FH) Reinhard Nissl
mailto:rnissl@xxxxxx

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr




[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux