>----Origineel Bericht----
>Van : rni...@gmx.de
>Datum : 27/12/2013 12:14
>Aan : vdr@linuxtv.org
>Onderwerp : Re: [vdr] porting vdr-plugin-sc from FFdecsa to dvbcsa: undefined 
>symbol
>
>Hi,
>
>Am 27.12.2013 11:30, schrieb cedric.dew...@telfort.nl:
>
>>     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:rni...@gmx.de

Hi  Reinhard,

It works! I have done what you said in cam.c. Now VDR starts the plugin without 
error messages.
now let's add the configuration files for sc, and watch some pay-TV (hopefuly)

Thank you very much.
Cedric

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

Reply via email to