[PyKDE] SIP: How to pass STL objects
Phil Thompson
phil at riverbankcomputing.co.uk
Sun Jan 25 14:34:00 GMT 2004
On Sunday 25 January 2004 1:20 pm, Jahn Otto Næsgaard Andersen wrote:
> Hi, I have made a class with a constructor that takes std::string and
> std::vector for various functions.
>
> Simplified example:
>
> %Module HoloLib
>
> class Bird
> {
> %TypeHeaderCode
> #include "bird.h"
> #include <string>
> %End
>
> public:
> Bird(std::string);
>
> virtual ~Bird();
>
> };
>
>
> When I try to SIP this file with
>
> /usr/local/bin/sip -s ".cpp" -c sipcode -I /usr/local/share/sip/qt -t
> Qt_3_2_0 -t WS_X11 bird.sip
>
> I get the following error message:
>
> sip: string is undefined, I get the error message
SIP doesn't have any concept of builtin types. You will have to wrap
std::string - probably defining it as a mapped type.
Phil
More information about the PyQt
mailing list