[PythonCE] compiling for winCE

Ajay abra9823 at mail.usyd.edu.au
Fri Sep 3 05:38:00 CEST 2004


hi!

i have written a simple extension module in C and am trying to compile it
for  the pocket pc.
the module code is pasted below
i am following the instructions in chapter4, section 4.1 step6 of "Building
C and C++ Extensions on Windows".

when i try building i get an error -
Compiling...
testDLL.c
..\PC\WinCE/pyconfig.h(59) : fatal error C1083: Cannot open include file:
'io.h': No such file or directory
Error executing clarm.exe.

testDLL.obj - 1 error(s), 0 warning(s)

a dummy io.h is present in \PC\WinCE
so what am i doing wrong?


thanks

cheers




#include <Python.h>

static PyObject*
test_dll(PyObject *self, PyObject *args)
{
	char *command;
	int sts;

	if (!PyArg_ParseTuple(args, "s", &command))
		return NULL;
	sts = 5;
	return Py_BuildValue("i", sts);
}

static PyMethodDef MyDLLMethods[] = {
	{"system", test_dll, METH_VARARGS, "test a dll."},
	{NULL, NULL, 0, NULL}
};

PyMODINIT_FUNC
initMyDLL(void)
{
	(void) Py_InitModule("MyDLL", MyDLLMethods);
}





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the PythonCE mailing list