Hi,
If I am in the wrong forum for this kind of thing, or am not posting the
correct information, please let me know.
I am very new to this.
We have two little perl scripts, which are trying to use Config to load
libraries. If we use DATA, along with Config, we
get an undefined symbol. Here is the script, followed by the error:
#!/usr/bin/perl
use Inline CPP => Config =>
LIBS =>
'-L/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl -lutil',
LIBS =>
'-L/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl -litac',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/include',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_cpp',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl';
use Inline CPP => DATA =>
LIBS =>
'-L/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl -lutil',
LIBS =>
'-L/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl -litac',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/include',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_cpp',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl';
;
process();
__DATA__
__CPP__
#include "Cccm_srdfaClientNwConfig.h"
#include <string>
using namespace std;
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include "./Cccm_log.h"
#include "Cccm_srdfaIpc.h"
extern "C"
{
#include "itac_pub.h"
#include "itac_prot.h"
}
int process()
{
Cccm_srdfaIpc *ipc = new Cccm_srdfaIpc(1,2,3);
Cccm_log log("ccmClientLog.txt");
printf("hello world\n");
log.Status("stat");
log.Error("this is really not an error.\n");
return 1;
}
/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl> rm -Rf _Inline
/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl> perl testDATA.pl
perl: error while loading shared libraries:
/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_pe
rl/_Inline/lib/auto/testDATA_pl_6ff1/testDATA_pl_6ff1.so: undefined symbol:
__13Cccm_srdfaIpcUlUsi
But nm has no trouble finding the same symbol which perl could not find:
find _Inline -name "*.so" -print -exec nm -D {} \;
_Inline/lib/auto/testDATA_pl_6ff1/testDATA_pl_6ff1.so
U Error__8Cccm_logPCce
U PL_curpad
U PL_markstack_ptr
U PL_op
U PL_stack_base
U PL_stack_sp
U PL_sv_yes
U Perl_croak
U Perl_form
U Perl_mg_set
U Perl_newXS
U Perl_sv_2pv
U Perl_sv_newmortal
U Perl_sv_setiv
00001260 W Status__8Cccm_logPCce
00000f00 T XS_main_process__FP2cv
U _._8Cccm_log
0000258c A _DYNAMIC
000024f0 A _GLOBAL_OFFSET_TABLE_
U __13Cccm_srdfaIpcUlUsi
U __8Cccm_logPCc
00002634 A __bss_start
U __builtin_delete
U __builtin_new
w __cxa_finalize
w __deregister_frame_info
w __gmon_start__
w __register_frame_info
U __rethrow
00002634 A _edata
0000264c A _end
00001290 ? _fini
00000b2c ? _init
00000fe0 T boot_testDATA_pl_6ff1
U perl_get_sv
U printf
00000df4 T process__Fv
U terminate__Fv
Alternately, if we use END instead, the C++ is not recognized:
#!/usr/bin/perl
use Inline CPP => Config =>
LIBS =>
'-L/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl -lutil',
LIBS =>
'-L/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl -litac',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/include',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_cpp',
INC =>
'-I/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl';
process();
__END__
__CPP__
#include <string>
using namespace std;
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include "./Cccm_log.h"
#include "Cccm_srdfaIpc.h"
extern "C"
{
#include "itac_pub.h"
#include "itac_prot.h"
}
Cccm_log *pLog=0;
int process()
{
Cccm_srdfaIpc *ipc = new Cccm_srdfaIpc(1,2,3);
Cccm_log log("ccmClientLog.txt");
printf("hello world\n");
log.Status("stat");
log.Error("this is really not an error.n\n");
return 1;
}
/mnt/view/ttobin_ccm0.2.0/vobs/srdfa/src/ccm/cli_perl> perl testEND.pl
Undefined subroutine &main::process called at testEND.pl line 11.
Any clues welcomed.
thanks,
Tom Tobin
EMC Corporation,
450 Fortune Boulevard, Milford, MA
Voice: (508) 346-8387
Pager: 877-950-8337 pager email [EMAIL PROTECTED]
email: [EMAIL PROTECTED]