I�m trying to use  swig to generate and build perl dynamically loaded
extension modules, using the following build commands.
This example comes straight from the swig �Examples� , so presumably works
on other platforms "as-is".
I had to add the flags for ld that I normally use for bundles.

gcc -c -Dbool=char   example.c example_wrap.c
-I/System/Library/Perl/darwin/CORE
ld -bundle -undefined suppress -flat_namespace example.o  example_wrap.o  -o
example.so
[localhost:Examples/perl5/simple] andrewc% perl example.pl
Can't locate loadable object for module example in @INC (@INC contains:
/System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin
/Library/Perl /Library/Perl /Network/Library/Perl/darwin
/Network/Library/Perl /Network/Library/Perl .) at example.pl line 4
Compilation failed in require at example.pl line 4.

Any suggestions as to why Perl can�t load the .so (bundle).

Andrew

Reply via email to