Re: Wrapper function

2005-10-11 Thread Java and Swing
So, I write the C code...as shown previously. Then, I do something like... c:\> python >> from distutils.core import setup, Extension >> >>setup( >>name="DLLTester", >>ext_modules = [Extension("DLLTester", ["test.c"])] >>) c:\> python setup.py build_ext -i ..is that it? If so, then

Re: Wrapper function

2005-10-11 Thread Robert Kern
Java and Swing wrote: > When I compile, I get two warnings..which are ok. Then when I build my > DLL I get.. > > Linking... >Creating library Release/MyDLL.lib and object Release/MyDLL.exp > test.obj : error LNK2001: unresolved external symbol _PyBuildValue > Release/MyDLL.dll : fatal error

Re: Wrapper function

2005-10-11 Thread Java and Swing
Diez, yes you were right! But I have other problems now. I now have... #include #include #include "Python.h" int doStuff(const char *input, const char *d) {...} static PyObject *wrap_doStuff(PyObject *self, PyObject *args) { int result; char *input = 0; char *d = 0;

Re: Wrapper function

2005-10-11 Thread Robert Kern
Java and Swing wrote: > I am having trouble with a wrapper function... > > My C code looks like > --- > #include > #include > #include "Python.h" > > int doStuff(const char *input, const char *d) {...} > > PyObject *wrap_doStuff(PyObject *, PyObject *args) { PyObject *wrap

Re: Wrapper function

2005-10-11 Thread Diez B. Roggisch
> PyObject *wrap_doStuff(PyObject *, PyObject *args) { ^ I guess you need a parameter name here Diez -- http://mail.python.org/mailman/listinfo/python-list