SWIG and C++

Pierre Puiseux pierre.puiseux at univ-pau.fr
Thu Feb 8 05:02:27 EST 2001


> 
> Hello,
> 
> is it possible with SWIG, to import in python a C++ class with 2 methods
> WITH THE SAME NAME but with different arguments.For instance :
> //file truc.h
> class truc
> {...
>         void mymethod(int, int);
>         void mymethod(float);
> }
> //
> 
> //File : truc.i
> %module truc
> 
> %{
> #include "truc.h"
> %}
> 
> %include truc.h
> //
> 
> //here is the swig command and the error message :
> >swig -c++ -shadow -python truc.i
> >Generating wrappers for Python truc.h : Line 17. Function truc_mymethod (member mymethod) multiply defined (2nd definition ignored).
> 
> Thanks
> 
> --
> Pierre PUISEUX
> Université de Pau et des Pays de l'Adour
> Laboratoire de  Mathématiques Appliquées
> Tél: (+) 33-5-59-92-31-67
> http://www.univ-pau.fr/~puiseux/home.htm



More information about the Python-list mailing list