title: Compiling S-Transform python wrappers on Mac OS X 64 bit
body: <p>I am trying to compile a the s-transform python wrappers from <a href="http://kurage.nimh.nih.gov/meglab/Meg/Stockwell" rel="nofollow">here</a> on my Mac (Mountain Lion, gcc45 installed from Macports, Python installed via Enthought 64-bit).</p>
  
  <p>I am a user in science rather than a compiler expert and while it worked out-of-the-box on my Linux machine (just changed <code>int</code> to <code>npy_intp</code> and <code>PyArray_FromDims</code> to <code>PyArray_SimpleNew</code>), I don't really know how to get there on my Macbook...</p>
  
  <p>So I build this Makefile:</p>
  
  <pre><code>PYINCDIR = /Library/Frameworks/EPD64.framework/Versions/Current/include/python2.7
  NUMPYDIR = /Library/Frameworks/EPD64.framework/Versions/Current/lib/python2.7/site-packages/numpy/core/include/numpy CFLAGS = -O3 -I$(PYINCDIR) -I$(NUMPYDIR) -fPIC
  
  all: sinemodule.so stmodule.so
  
  sinemodule.so: sinemodule.o     $(CC) -shared -o $@ sinemodule.o
  
  stmodule.so: stmodule.o st.o    $(CC) -shared -o $@ stmodule.o st.o
  -lfftw3
  </code></pre>
  
  <p>And trying to "make", I get:</p>
  
  <pre><code>cc -shared -o sinemodule.so sinemodule.o
  Undefined symbols for architecture x86_64:
  "_PyArg_ParseTuple", referenced from:
    _sine_taper_wrap in sinemodule.o
  "_PyCObject_AsVoidPtr", referenced from:
    _initsine in sinemodule.o
  "_PyCObject_Type", referenced from:
    _initsine in sinemodule.o
  "_PyErr_Format", referenced from:
    _initsine in sinemodule.o
  "_PyErr_Print", referenced from:
    _initsine in sinemodule.o
  "_PyErr_SetString", referenced from:
    _initsine in sinemodule.o
  "_PyExc_AttributeError", referenced from:
    _initsine in sinemodule.o
  "_PyExc_ImportError", referenced from:
    _initsine in sinemodule.o
  "_PyExc_RuntimeError", referenced from:
    _initsine in sinemodule.o
  "_PyImport_ImportModule", referenced from:
    _initsine in sinemodule.o
  "_PyObject_GetAttrString", referenced from:
    _initsine in sinemodule.o
  "_Py_InitModule4_64", referenced from:
    _initsine in sinemodule.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [sinemodule.so] Error 1
  </code></pre>
  
  <p>Maybe this is a very basic thing but to be honest I don't even know where to start reading to fix it...</p>
  
  <p>Cheers for your help!</p>