Hi Brian,

I hope you had a good time in Germany and on the "German Perl
Workshop". 

On Sat, Feb 24 2001, Brian Ingerson wrote:
> In the forthcoming Inline-0.32, you will be able to expose symbols
> between shared objects.
> 
> ----8<----
> use Inline Global;

This week I was testing your "GLOBAL" feature in your new version
0.32.  I have taken exactly the example included in this original
email.  While this example is running on my Linux box, it it
not under AIX :-( What else did you expect !!!

I get an error like this:

  ld: 0711-317 ERROR: Undefined symbol: .squared

I have attached both files ".Inline/.../out.make" from AIX and from
Linux to provide more informations.  While the Linux make has a
"-shared" flag I can't see anything similar on the AIX.  Do you have
any clue where I should look or what I can change ?

Cheers,

Norbert
-- 
Ceterum censeo          | PGP encrypted mail preferred.
Redmond esse delendam.  | PGP Public Key at www.MPA-Garching.MPG.DE/~nog/
mkdir blib
mkdir blib/lib
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/main_C_perl_72_d237fac999017ffdc2315401ea845109
mkdir blib/lib/auto
mkdir blib/lib/auto/main_C_perl_72_d237fac999017ffdc2315401ea845109
/usr/bin/perl -I/usr/lib/perl5/5.00503/i586-linux -I/usr/lib/perl5/5.00503 
/usr/lib/perl5/5.00503/ExtUtils/xsubpp  -typemap 
/usr/lib/perl5/5.00503/ExtUtils/typemap  
main_C_perl_72_d237fac999017ffdc2315401ea845109.xs >xstmp.c && mv xstmp.c 
main_C_perl_72_d237fac999017ffdc2315401ea845109.c
cc -c  -Dbool=char -DHAS_BOOL -I/usr/local/include -O2 -pipe    -DVERSION=\"0.00\" 
-DXS_VERSION=\"0.00\" -fpic -I/usr/lib/perl5/5.00503/i586-linux/CORE  
main_C_perl_72_d237fac999017ffdc2315401ea845109.c
Running Mkbootstrap for main_C_perl_72_d237fac999017ffdc2315401ea845109 ()
chmod 644 main_C_perl_72_d237fac999017ffdc2315401ea845109.bs
LD_RUN_PATH="" cc -o 
blib/arch/auto/main_C_perl_72_d237fac999017ffdc2315401ea845109/main_C_perl_72_d237fac999017ffdc2315401ea845109.so
  -shared -L/usr/local/lib main_C_perl_72_d237fac999017ffdc2315401ea845109.o     
chmod 755 
blib/arch/auto/main_C_perl_72_d237fac999017ffdc2315401ea845109/main_C_perl_72_d237fac999017ffdc2315401ea845109.so
cp main_C_perl_72_d237fac999017ffdc2315401ea845109.bs 
blib/arch/auto/main_C_perl_72_d237fac999017ffdc2315401ea845109/main_C_perl_72_d237fac999017ffdc2315401ea845109.bs
chmod 644 
blib/arch/auto/main_C_perl_72_d237fac999017ffdc2315401ea845109/main_C_perl_72_d237fac999017ffdc2315401ea845109.bs
/usr/local/bin/perl "-I/usr/local/lib/perl5/5.00502/aix" 
"-I/usr/local/lib/perl5/5.00502" -e 'use ExtUtils::Mksymlists; \
Mksymlists("NAME" => "main_C_perl_72_d237fac999017ffdc2315401ea845109", "DL_FUNCS" => 
{  }, "DL_VARS" => []);'
/usr/local/bin/perl -I/usr/local/lib/perl5/5.00502/aix -I/usr/local/lib/perl5/5.00502 
/usr/local/lib/perl5/5.00502/ExtUtils/xsubpp  -typemap 
/usr/local/lib/perl5/5.00502/ExtUtils/typemap  
main_C_perl_72_d237fac999017ffdc2315401ea845109.xs 
>main_C_perl_72_d237fac999017ffdc2315401ea845109.tc && mv 
main_C_perl_72_d237fac999017ffdc2315401ea845109.tc 
main_C_perl_72_d237fac999017ffdc2315401ea845109.c
cc -c  -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192 
-I/usr/local/include -O    -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\"  
-I/usr/local/lib/perl5/5.00502/aix/CORE  
main_C_perl_72_d237fac999017ffdc2315401ea845109.c
Running Mkbootstrap for main_C_perl_72_d237fac999017ffdc2315401ea845109 ()
chmod 644 main_C_perl_72_d237fac999017ffdc2315401ea845109.bs
LD_RUN_PATH="" ld -o 
blib/arch/auto/main_C_perl_72_d237fac999017ffdc2315401ea845109/main_C_perl_72_d237fac999017ffdc2315401ea845109.so
  -bhalt:4 -bM:SRE -bI:/usr/local/lib/perl5/5.00502/aix/CORE/perl.exp 
-bE:main_C_perl_72_d237fac999017ffdc2315401ea845109.exp -b noentry -lc 
-L/usr/local/lib main_C_perl_72_d237fac999017ffdc2315401ea845109.o     
ld: 0711-317 ERROR: Undefined symbol: .squared
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: *** 
[blib/arch/auto/main_C_perl_72_d237fac999017ffdc2315401ea845109/main_C_perl_72_d237fac999017ffdc2315401ea845109.so]
 Error 8
use Inline Global;
use Inline C;
use Inline C;

my ($a, $b) = @ARGV;

print "$a ^ 2 + $b ^ 2 = ", sum_squares($a, $b), "\n";

__END__

__C__
extern int squared(int);

int squared(int x) {
    return x * x;
}

__C__
int sum_squares(int a, int b) {
    return squared(a) + squared(b);
}

Reply via email to