[Pythonmac-SIG] How can XCode find Python.h?
Frederick C. Lee
fclee at highstream.net
Thu May 5 23:28:11 CEST 2005
I'm following an c-module example in 'Programming Python'.
The C code depends on 'Python.h'.
The first thing I did was use Spotlight to find where 'Python.h' is.
I found it: /Developer/SDKs/MacOSX10.4.0.sdk/..../include/python2.3/
Python.h <-- def as PYHEADERS env variable in .login.
So I set the 'Header Search Paths' under 'Search Paths' in XCode via
$PYHEADERS env variable that I had set in my .login file.
But this has no effect within XCode Build.
Any ideas?
Ric.
#include <Python.h> <--- where? "No such file or directory."
#include <string.h>
// Modle Functions
static PyObject * // returns object.
message(PyObject *self, PyObject *args) { // 'self' unused in
modules. 'args' from python call.
char *fromPython, result[64];
if (!PyArg_Parse(args,"(s)",&fromPython))
return NULL;
else {
strcpy(result,"Hello, "); // build up C string.
strcat(result, fromPython); // add passed
Python-string.
return Py_BuildValue("s",result); // convert C -->
Python.
}
} // end message()
... etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050505/ad0e8dc9/attachment-0001.html
More information about the Pythonmac-SIG
mailing list