Yes, the python .so is in my LD path. <br>I can import the module from python without changing any environment variables.<br><br>As the compiler flag reveals, I am building a Matlab extension. I need some numpy functionality which I don't want to re-code.<br>
<br>Perhaps Matlab uses a different method to dynamically load libraries? <br><br><div class="gmail_quote">On Tue, Jan 13, 2009 at 12:20 AM, Michael Abshoff <span dir="ltr"><<a href="mailto:michael.abshoff@googlemail.com">michael.abshoff@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Igor Sylvester wrote:<br>
> I built it against *Python 2.5.1.<br>
><br>
> compile:*<br>
> gcc -c<br>
> -I/usr/lib/python2.5/site-packages/numpy-1.0.4.0002-py2.5-linux-x86_64.egg/numpy/core/include<br>
> -I/usr/bin/python/2.5.1/include/python2.5 -fPIC -fno-omit-frame-pointer<br>
> -pthread -fexceptions -ansi -D_GNU_SOURCE -DMX_COMPAT_32 -g main.c<br>
><br>
> compile line for the other c-file is identical to main.c's<br>
><br>
> *link:*<br>
> gcc -g -pthread -shared main.o module.o -L/usr/bin/python/2.5.1/lib<br>
> *-lpython2.5* -ldl -lm -lpthread -lutil -lmx -lmex -lmat -lm -lm -lstdc++<br>
><br>
<br>
</div>Ok, so far so good. Is /usr/bin/python/2.5.1/lib in LD_LIBRARY_PATH ?<br>
<br>
Out of curiosity: Are you building something against matlab, i.e. are<br>
you linking against MATLAB's mex?<br>
<br>
Cheers,<br>
<br>
Michael<br>
<br>
<SNIP><br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
Cython-dev mailing list<br>
<a href="mailto:Cython-dev@codespeak.net">Cython-dev@codespeak.net</a><br>
<a href="http://codespeak.net/mailman/listinfo/cython-dev" target="_blank">http://codespeak.net/mailman/listinfo/cython-dev</a><br>
</div></div></blockquote></div><br>