[Numpy-discussion] extension module with swig

Matthieu Brucher matthieu.brucher@gmail....
Tue Nov 4 04:24:40 CST 2008


> # dot extension module
> _test = Extension("_test",
>                     ["test_wrap.c",
>                      "test.c"],
>                     include_dirs = [numpy_include,'/data/home/
> u0038151/include'],
>                    library_dirs = ['/data/home/u0038151/lib']
>                   )
>
> # NumyTypemapTests setup
> setup(name        = ["test"],
>       description = "test c module swigging",
>       author      = "Giovanni Samaey",
>       py_modules  = ["test"],
>       ext_modules = [_test ]
>       )
>
> The error message is the following:
>
> 0 u0038151@lo-03-02 dot2 $ python -c "import test"
> Traceback (most recent call last):
>   File "<string>", line 1, in ?
>   File "test.py", line 7, in ?
>     import _test
> ImportError: ./_test.so: undefined symbol: gsl_rng_mt19937

Hi,

Where did you add the gsl library when building the extension ? I
think the Extension class is missing an argument (library = ["gsl"] or
something like that)

Matthieu
-- 
Information System Engineer, Ph.D.
Website: http://matthieu-brucher.developpez.com/
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn: http://www.linkedin.com/in/matthieubrucher


More information about the Numpy-discussion mailing list