[Pyrex] [Mac Inter Core Duo OS 10.4.9 ] Next question: cmd line build of init

Lenard Lindstrom len-l at telus.net
Thu Jun 7 01:01:23 UTC 2007


David Goldsmith wrote:
> OK, so now I have:
>
> In SolveSAC_Wrap.pyx:
>
> *# Pyrex wrapper for SolveSAC
>
> import BMMain as BMM
>
> test_vals = BMM.BMGlobalInputsWrapper()
> test_vals.getAllInputs("/Users/dg/Documents/NOAA/Projects/BaroModes/software/BMS
> ettingsFile.asc")
>
> def GetNumVertices():
>     return _GetNumVertices()
>
> cdef public long _GetNumVertices():
>     if test_vals.nodes:
>         return test_vals.d.getNrows()
>
> *and in run_SolveSAC_Wrap.py:
>
> *import SolveSAC_Wrap as SSW
>
> print SSW.GetNumVertices()
> *
> and I still get:
>
> $ python run_SolveSAC_Wrap.py
> Traceback (most recent call last):
>   File "run_SolveSAC_Wrap.py", line 1, in <module>
>     import SolveSAC_Wrap as SSW
> ImportError: dynamic module does not define init function 
> (initSolveSAC_Wrap)
>
Are you compiling with MinGW? Either the init function is not exported 
or the name is getting mangled, eg an _imp__ prefix is added.

-- 
Lenard Lindstrom
<len-l at telus.net>




More information about the Pyrex mailing list