Thursday, April 29, 2010

TOSSIM Python compiling problem

When you use TOSSIM in TinyOS, you come up to this error:

In function ‘void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)’
error: invalid conversion from ‘const char*’ to ‘char*’

(overall there are two errors like this one)

First check whether the error can be solved using solution on TinyOS wiki website on
TOSSIM .

If even than, it doesn't work,
go to $TOSROOT/tos/lib/tossim and run ./generate-swig.bash
In my case, it shows you some warnings, but that is ok.
afterwards, it worked fine for me.

If you still have troubles, check also:
python and python-dev should be on the same version,
swig should be installed.

If all this didnt solve your problems, good luck finding it, and I hope you put the solution somewhere on internet as well.