[PythonCE] compiling for winCE

Ajay abra9823 at mail.usyd.edu.au
Sat Sep 4 06:48:20 CEST 2004


hi!

i can now compile my c files into dll files using both SWIG and directly
writing the wrapper.
however when i call the dll from a python program i get an error saying: No
moudle named testdll

my SWIG interface file is
/* File: mytest.i */
%module mytest1
%{

%}

extern int incrementNumber(int);

and the C file
int incrementNumber(int num)
{
	num += 5;
	return num;
}
and i am compiling it to mytest1.dll

the other file where i have written the wrappers is called testdll.dll and
the C code is
#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 testdllMethods[] = {
	{"system", test_dll, METH_VARARGS, "test a dll."},
	{NULL, NULL, 0, NULL}
};

PyMODINIT_FUNC
inittestdll(void)
{
	(void) Py_InitModule("testdll", testdllMethods);
}

please help

thanks

cheers




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


More information about the PythonCE mailing list