How to access MFC classes in Python using SWIG ?
harry_chillboy at rediffmail.com
Thu Dec 18 13:43:50 CET 2003
Brian Kelley <bkelley at wi.mit.edu> wrote in message news:<3fe07ab5$0$579$b45e6eb0 at senator-bedfellow.mit.edu>...
> John J. Lee wrote:
> > harry_chillboy at rediffmail.com (Harish) writes:
> >>I am using Python2.3 version with SWIG-1.3.19 to access C++ interface
> >>provided by a DLL.
> >>Some of its function returns MFC class objects like CString , CMap. I
> >>tried to generate wrapper for these classes using SWIG by including
> >>respective header files in .i file.
> >>But it doesn't work. Swig reports hundreds parsing errors in MFC's
> the ctypes package may do what you want
Thanx Brian for your reply,
ctypes is really very helpful in my case to access most of the
functions. But I am stuck with some functions which return objects of
MFC::CString or CMap<>. ctype talks only about c type function and
simple data types. SWIG provides readymade wrappers for common STL
classes but not MFC :(
More information about the Python-list