[PyKDE] QCString is undefined error

Jim Bublitz jbublitz at nwinternet.com
Sun Aug 11 01:59:01 BST 2002


On 10-Aug-02 Antoni Aloy López wrote:
> After patching the build.py file to locate my Qt/sip and to
> correct the version bug and after installing the tmake I have
> tried to build the new PyKde, but I get this error message:

You don't need to modify build.py to specify a sip file location:

   python build.py -lqt-mt -v /usr/local/PyQt-3.3.2/sip -c    

The -v switch lets you specify the location of PyQt's sip files
(although in this case build.py would find them without -v).

   python build.py -h 

will give you all of the switches - virtually any setup should be
able to be specified without editing build.py. You can also use the
-z switch to specify a file with the switches:

   python build.py -z buildrc

where PyKDE-3.3.2/buildrc contains:

-lqt-mt
-v/usr/local/PyQt-3.3.2/sip
-c

should be equivalent to the command line above.

> Generating the C++ source for the dcop module.
> sip: QCString is undefined
> ******************************************************************
> ************
> Error: /usr/bin/sip failed with an exit code of 256 -- from line
> 1116 in
> build.py
> ******************************************************************
> ************

> My TMAKEPATH  points to /usr/lib/tmake/linux-g++/ and I'm using
> Gentoo Linux. 

That's correct.
 
> Any ideas?
 
> The full log follows:

The log looked correct up to the point of failure. First, make sure
you have qcstring.sip in the PyQt sip directory you specified, and
qtmod.sip contains a '%Include qcstring.sip' line. Next, in the
generateSource function in build.py do the following (around line
1036):


change:
    runProgram (sipBin, argv)

to:
    print sipBin
    print argv

    runProgram (sipBin, argv)

the argv list should contain a '-I <PyQt sip file path>' where
'PyQt sip file path' is replaced with the value specified with -v
or that you edited in to build.py. I don't imagine permissions
should be a problem, but you might check that you can actually
access the PyQt sip files (especially qcstring.sip) as well.

This is a completely new build system, so I wouldn't be surprised
to find some bugs, however I don't see what might cause this at the
moment. I just re-ran build.py with PyQt's sip files copied to an
odd location and using the -v switch, and it ran without errors.


Jim




More information about the PyQt mailing list