compile error on SWIG file
lyle at users.sourceforge.net
Mon Sep 9 20:34:35 CEST 2002
Markus von Ehr wrote:
> I only extended the std_vector example from the distribution with
> one function, see example.i included (there are templates inside).
> When I run SWIG with -c++ option, the warnings disappear in fact.
> But the error from the compiler is the same...
If you named the output file "mvelib.c", you are telling your compiler
that it's C source code (and it isn't). It's C++ source code, so give it
a C++ extension, e.g.
swig -c++ -python -o mvelib.cpp mvelib.i
You will also need to update your setup.py script to use the corrected
file name ("mvelib.cpp" instead of "mvelib.c").
More information about the Python-list