[Pythonmac-SIG] Swig_for_Mac

Chris Barker Chris.Barker at noaa.gov
Mon Feb 9 13:48:21 EST 2004


Christopher Smith wrote:

 > Now I don't know what to do from here. I am having a hard time sifting
 > out what can/should be done with the Swig_for_Mac and what must be done
 > at the command line with gcc.  One of the pages that I've consulted says
 > to issue a gcc compile of the example.c and example_wrap.c files. When I
 > do that I get the following output:
 >
 > csmith% gcc -c example.c example_wrap.c -I/usr/local/include/python2.2
 > -I/usr/local/include/python2.2
 > example_wrap.c:27: header file 'string.h' not found
 > example_wrap.c:203: header file 'stdlib.h' not found

As someone already metntioned, SWIG builds the C wrapper code, but you 
still have to compile that code like any other extension. I've found it 
easiest to use distutils to compile my extensions. see:

http://www.python.org/doc/current/ext/building.html#building

for how to do it.

That may not solve your problem, as your missing headers are system 
ones, not Python ones, but it's may make the rest of your project easier.

-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

Chris.Barker at noaa.gov




More information about the Pythonmac-SIG mailing list