[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 08:56:03 UTC 2007
David Goldsmith wrote:
> 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...)
>
>
I wasn't paying attention to the message subject. It's just that your
problem sounded like something that might happen if one tried to build a
dynamic library by hand using MinGW. But MinGW is strictly a Windows
version of gcc. I know nothing about OS X dynamic libraries. But it
still appears that the init function for the Pyrex module is not being
exported. Is there some compiler option that exports all non-static
functions? I did compiler your SolveSAC_Wrap example and it did load,
but failed because I had no BMMain to import. This is the setup.py file
I used:
from distutils.core import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
name = 'SolveSAC_Wrap',
ext_modules=[
Extension("SolveSAC_Wrap", ["SolveSAC_Wrap.pyx"])
],
cmdclass = {'build_ext': build_ext}
)
Just execute it with:
python setup.py build_ext --inplace
I am guessing distutils uses cc on OS X.
--
Lenard Lindstrom
<len-l at telus.net>
More information about the Pyrex
mailing list