Cython unable to find C functions and object from external C file
<p>Right now I am trying to load C functions using Cython into Python, similar to what is described here: <a href="http://docs.cython.org/src/userguide/external_C_code.html" rel="nofollow">http://docs.cython.org/src/userguide/external_C_code.html</a>. Let's say my C file is called temp.c, my pxd file is called decl.pxd, and my pyx file is called test.pyx. Let's say I have a function I am trying to import from temp.c called <code>int my_func(int spam)</code>:</p>

<pre><code>cdef extern from "temp.c":
 int my_func(int spam)
cdef int my_func(int spam)
</code></pre>

<p>I then cimport my_func into test.pyx and try to use it:</p>

<pre><code>from decl cimport my_func

my_func(1)
</code></pre>

<p>Cython compiles this fine, but then when I try to import the "test" module built from test.pyx using the Python shell, it throws an error and says "symbol my_func not recognized". Furthermore, when I look at the html file that is generated by the Cython compiler where you can view the C code that is generated for test.pyx, the code from the C file for <code>my_func</code> is not there, showing that Cython must have been unable to find <code>my_func</code>. </p>

<p>I realize that I haven't gone into much detail about what temp.c looks like, but is there a way I can debug for why Cython is apparently unable to find the source code for <code>my_func</code>?</p>