Paul Kinnane wrote: > I have now got the library compiled and working in Dawrin python. I > simply compiled and linked with g++ instead of gcc (I did this by > manually entering the compile and link commands that setup.py was > issuing, changing "gcc" to "g++').
I'd still like to know how to make distutils do this right...anyone? > The resulting file is ode.so, and > after doing an "install" I can "import ode" and use the library. The > "Loaded module does not contain symbol _initode2" error was due to me > renaming the ode.so library - which appears to be a no-no. yes, it is a no-no. It is assumed that foo.so will contain an initfoo() function to initialize the module. > I want to use the library in MacPython (rather than Darwin python). What is MacPython vs. darwin Python? There is now one, unified python. You can use 2.3.* or 2.4.*, but either way, it's native OS-X. If you want to run it under classic (or on an old pre-OS-X machine), then you are talking a different beast, and you're not going to get it with gcc under OS-X. gcc only knows how to make mach-o binaries. You'll need CFM binaries. Your best bet is probably code warrior, which I don't think is supported in any way, shape or form by distutils. I used to compile python extensions with Code Warrior, and it wasn't too hard. Just the usual struggle to include and link all the right files. I think MPW can do it too, but I've never tried that. Now I know why you were looking at those old docs at the beginning of this adventure! Do you really need to run this under Classic? -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig