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

David Goldsmith David.L.Goldsmith at noaa.gov
Thu Jun 7 07:19:48 UTC 2007


I'm compiling w/ cc and linking w/ ld (at first I was trying to compile 
w/ gcc, but while I was having problems, I found a book "Advanced OS X 
Programming" or some such and their examples used cc and ld so I 
switched to that).  Are you implying that I should I be using MinGW, or 
wondering if I am cause that would be the basis of the problem?  Is 
MinGW even an option on the Mac?  (For some reason I have it in my head 
that that's a Windows thing...)

DG

Lenard Lindstrom wrote:
> 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.
>
>   

-- 
ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/>



More information about the Pyrex mailing list