what is reloc error ?

Travis Oliphant olipt at mayo.edu
Tue Apr 20 08:54:26 EDT 1999


> 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





More information about the Python-list mailing list