Krishna Kumar Rangan <[EMAIL PROTECTED]> writes:
>Hi
>
>Sorry for emailing directly.  I had posted this
>question on comp.lang.perl.misc and
>comp.lang.perl.modules, but did not get any help.  I
>saw your replies to questions related to the one I
>have and thought of asking you.
>
>I want to debug a perl script run by a perl
>interpreter embedded in a C++ application.  The perl
>script (sample.pl) uses a module named 'foo' and
>foo.pm uses an another module 'bar'.  Both foo and bar
>modules are linked to C++ libraries.  
>
>When sample.pl is invoked from the command line,
>bar.pm finishes loading successfully (bar.so is
>successfully loaded) and foo.pm load fails elsewhere. 

I suggest you fix that first.


>However, when the script is interpreted from the C++
>application, loading bar.pm fails.  The error message
>says that  there is an error in line 27 in foo.pm -
>and line 27 contains 'use bar'.  I am assuming that
>bar.so load fails.

Please:
 A. copy/paste exact error messages - all of them not just the last line.
 B. Run perl -V and attach its output.

>
>My questions are - Is it possible to get an error
>message that is little more detailed?  perl_parse
>documentation is not found anywhere; I am calling the
>routine with the arguments (perl_interp, NULL, argc,
>argv, NULL) with argv[1] = "sample.pl".
>
>nm bar.so, shows these undefined symbols which did not
>cause any problems when sample.pl is invoked frm
>command line.
>...
>         U PL_curpad
>         U PL_markstack_max

Those are symbols in libperl.a (or perl5X.dll or ...)

On Solaris/Linux etc. such symbols are resolved against the root 
executable, but not against other loadables.
For some reason your C++ "root" is not exporting those symbols.
Please show us exactly how the C++ application was "linked".

-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/

Reply via email to