Marc Mettes wrote:
> 
> I'm working on a project embedding and extending perl into a CAD API.
> The API allows for an external executable that communicates through
> an RPC mechanism, or a shared library loaded dynamically.  The choice
> is made at link time by the selection of the appropriate library.
> 
> I've had great success on Solaris8/gcc with the external executable
> using a statically built perl and everything runs as expected.  The
> shared library method using the same perl has caused some problems
> when using C based perl modules.
> 
> When using this 'go.pl':
>   use Data::Dumper;
>   print "hello world", "\n";
> 
> I get the following error message:
> 
> Can't load '/usr/perl/lib/5.6.1/sun4-solaris/auto/Data/Dumper/Dumper.so'
>  for module Data::Dumper: ld.so.1: /opt/pro/sun4_solaris/obj/pro: fatal:
>  relocation error: file
> /usr/perl/lib/5.6.1/sun4-solaris/auto/Data/Dumper/Dumper.so:
>  symbol main: referenced symbol not found at
> /usr/perl/lib/5.6.1/sun4-solaris/XSLoader.pm line 75.
>  at /usr/perl/lib/5.6.1/sun4-solaris/Data/Dumper.pm line 27
> Compilation failed in require at go.pl line 5.
> BEGIN failed--compilation aborted at go.pl line 5.
> 
> With just the print statement, the script runs just fine.  Can someone
> give me some suggestions on resolving this problem?


The error complains about a 'main', but which 'main' is it 
talking about?  In this situation, I don't have a main().  
The main() is in the CAD executable, which loads my shared 
library and excutes my user_initialize().


Marc
-- 
Marc Mettes
CAD Support
Bic Corporation

Reply via email to