I tried to run cython from my notebook by typing these few lines
adapted from from (http://docs.cython.org/src/quickstart/build.html)

<pre>
%cython

cdef extern from "math.h":
    double sin(double)

cdef double f(double x) except *:
    return sin(x**2)

def integgratex(double a, double b, int N):
    cdef int i
    cdef double dx, s = 0
    dx = (b-a)/N
    for i in range (N):
        s += f(a+i*dx)
    return s*dx
</pre>

On two different Linux computers I get the following error message:

<pre>
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

__home_mat...16_code_sage4_spyx.c   __home_mat...code_sage4_spyx.html
</pre>

When I google this error I gel only very few. Maybe someone is around
who knows this erroro message or can provide a working example.

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to