From: olipt at mayo.edu (Travis Oliphant)
Date: Tue, 20 Apr 1999 07:54:26 -0500
Subject: what is reloc error ?
In-Reply-To: <371A1E26.846AF8B6@pk.highway.ne.jp>
References: <371A1E26.846AF8B6@pk.highway.ne.jp>
Message-ID: <Pine.LNX.4.04.9904200748390.26615-100000@us2.mayo.edu>
X-UID: 1695                                                  

> Hello, everyone.
> I am now working on building Python interface
> to my C++ matrix library.
> 
> I have a problem.
> After compiling and when trying to import my
> module
> I get following message.
> 
>    % gcc -c XXXtype.cc
>    % gcc -c subXXXtype.cc
>    .......................
>    % ld -o XXXtype.so -dy -G -g *.o -lstdc++
>    % python -c "import XXXtype"
>    python: can't handle reloc type <NULL> 
> <====this!!!

I'm not entirely sure if this will fix your problem, but 
I think you need to give a flag to gcc to tell it to make a shared
library.

Try gcc -fPIC -c *.cc         # not sure if this is necessary with gcc 
and ld  -shared -o XXXtype.so *.o


Good luck,


Travis





