On 4/18/07, David Cournapeau <[EMAIL PROTECTED]> wrote:

Robert Kern wrote:
> Charles R Harris wrote:
>
>
>> I don't know which is best, although I suspect the statically linked
>> version will be larger. It might seem that just pulling in the gemm
>> routines wouldn't add much, but they pull in lots of supporting
>> routines. To get numpy to link statically you will also probably need
to
>> have a directory that contains only the *.a versions because the linker
>> will default to the *.so if they are present; i don't think there is a
>> way to specify the -static flag to the gcc compiler. Maybe someone else
>> knows how to do that.
>>
>
> Not really. Since you are *making* a shared library, the flags are
already set
> to *look up* shared libraries. I do not believe they are overridable,
much to my
> frequent vexation.
>
I think there is a way, but not trivial. I had to do all kind of tricks
to use fftw in mex (matlab extension written in C, practically
dynamically loaded .so inside matlab), and linking statically some
libraries was one of them. If you still need it (linking some libraries
statically, other dynamically, to build a .so), I can try to dig in my
matlab scripts (unused for some time thanks to scipy :) )


I'm wondering if the static libraries could simply be compiled with the
-fPIC flag and linked with the program to produce the dynamic library. The
static libraries are just collections of *.o files, so I don't see why that
shouldn't work.

Chuck
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to