[PyKDE] first sip example

Phil Thompson phil at riverbankcomputing.co.uk
Tue May 31 18:08:27 BST 2005


On Tuesday 31 May 2005 9:00 am, Jean-Didier Lemarechal wrote:
> Hello,
>
> I am trying to run my first SIP example.
> And as you can figure, it's not working...
>
>
> Thanks for help !
>
>
> My MEEGData.sip file looks like this:
>
>
> /********************************************/
>
> // Interface to the MEEGFormat library.
>
> %Module meegformat 0
>
> class MEEGData {
>
> %TypeHeaderCode
> #include <format/MEEGData.h>
> %End
>
> public:
>     MEEGData ( string );
>
> };
>
> /********************************************/
>
>
> I use the example configure.py script:
>
> import os
> import sipconfig
>
> # The name of the SIP build file generated by SIP and used by the build
> # system.
> build_file = "MEEGData.sbf"
>
> # Get the SIP configuration information.
> config = sipconfig.Configuration()
>
> # Run SIP to generate the code.
> os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file,
> "MEEGData.sip"]))
>
> # Create the Makefile.
> makefile = sipconfig.SIPModuleMakefile(config, build_file)
>
> # Add the library we are wrapping.  The name doesn't include any platform
> # specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
> # ".dll" extension on Windows).
> makefile.extra_libs = ["MEEGData"]
>
> # Generate the Makefile itself.
> makefile.generate()
>
>
> /***************************************************************/
>
>
> and when I run 'python ./configure.py', I get the following error messages:
>
> sip: string is undefined
> Error: Unable to open "MEEGData.sbf": [Errno 2] No such file or directory:
> 'MEEGData.sbf'

The clue is in the error message - you haven't provided a definition of 
string.

Phil




More information about the PyQt mailing list