Need help configuring pyrex for primes.pyx example

Skip Montanaro skip at pobox.com
Thu Aug 1 23:35:16 EDT 2002


    [debl at whiplash Demos] python ../pyrexc primes.pyx 
    [debl at whiplash Demos] gcc -c -fPIC -I/usr/local/ActivePython-2.2/include/python2.2 primes.c
    [debl at whiplash Demos] gcc -shared primes.o -o primes.so
    [debl at whiplash Demos] primes.so 
    Segmentation fault (core dumped)
    [debl at whiplash Demos] 

A shared object file such as primes.so is not going to be executable all by
itself.  Instead, try running the python interpreter and executing

    import primes

at the prompt.  You can then execute

    dir(primes)

to see what symbols are available in the primes module (probably something
like findprime or isprime functions).

-- 
Skip Montanaro
skip at pobox.com
consulting: http://manatee.mojam.com/~skip/resume.html




More information about the Python-list mailing list