title: How to use a symbol from a (32 bit) static library in Cython (32 bit)
body: <p>I am trying to use Cython to expose a function from a static library to python. I have a <code>myLibrary.lib</code> and a <code>myLibrary.dll</code> file, but no header file. In the library, there is a function/symbol named  <code>myFunc</code>.</p>
  <p>So I wrote my <code>core.pxd</code> file:</p>
  <pre><code>cdef extern short myFunc(char*, short*, int*, float*, short*)
  </code></pre>
  <p>And my <code>core.pyx</code> file:</p>
  <pre><code>import numpy as np
  cimport numpy as np
  
  def get_data(char[:] path, int istart, int iend):
      cdef short err = 0
      cdef int[:] pts = np.arange(istart, iend, dtype=np.int32)
      cdef short nPts = &lt;short&gt;pts.shape[0]
      cdef float[:,:,:] out = np.zeros((nPts, 11, 18), dtype='f4')
  
      myFunc(&amp;path[0], &amp;nPts, &amp;pts[0], &amp;out[0,0,0], &amp;err)
  
      return np.asarray(out)
  </code></pre>
  <p>Which I am finally building using:</p>
  <pre><code>from setuptools import setup, Extension
  from Cython.Build import cythonize
  import numpy
  
  
  setup(
      ext_modules = cythonize([
          Extension('mymodule.core', ['mymodule/core.pyx'],
                    include_dirs=[numpy.get_include()],
                    libraries=['myLibrary'],
                    library_dirs=['mymodule'],
          )
      ])
  )
  </code></pre>
  <p>Which I then run using:</p>
  <pre><code>python setup.py build_ext --inplace
  </code></pre>
  <p>However, it gives me the error:</p>
  <pre><code>core.obj : error LNK2001: unresolved external symbol _myFunc
  </code></pre>
  <p>It seems to be searching for the symbol <code>_myFunc</code> rather than <code>myFunc</code>. How can I prevent Cython from searching for a underscore-prefixed symbol and just use the symbol as I specified?</p>
  <p>I am using 32-bit python 3.6, the library is 32-bit, and I have installed 32-bit versions of numpy and Cython. The library files (dll and lib) are in the same directory as the <code>core.pyx</code> file.</p>