[Qgis-developer] PyQt compile problem

William Kyngesburye woklist at kyngchaos.com
Wed Nov 12 09:57:58 EST 2008


On Nov 12, 2008, at 8:40 AM, Martin Dobias wrote:

> Hi William,
>
> looking at SIP 4.7.8 there are some changes regarding typedefs that
> probably cause different behaviour. Now in qgsgeometry.sip there's a
> typedef for size_t inside QgsGeometry class. I guess that new SIP now
> explicitly tries to use QgsGeometry::size_t and that's not correct.
>
> Please try to edit python/core/qgsgeometry.sip file and move "typedef
> unsigned int size_t;" before definition of the class QgsGeometry. If
> that helps I'll commit the fix to SVN.
>
> Regards
> Martin


Now I get:

[ 61%] Generating core/core.so
sipcoreQgsFeature.cpp: In function ‘PyObject*  
meth_QgsFeature_setGeometryAndOwnership(PyObject*, PyObject*)’:
sipcoreQgsFeature.cpp:492: error: ‘size_t’ is not a member of  
‘QgsFeature’
sipcoreQgsFeature.cpp:492: error: expected `;' before ‘a1’
sipcoreQgsFeature.cpp:495: error: ‘a1’ was not declared in this scope
sipcoreQgsFeature.cpp:498: error: no matching function for call to  
‘QgsFeature::setGeometryAndOwnership(unsigned char*&, <type error>)’
/Users/Shared/src/qgis/svn/qgis-1.0.0p2/src/core/qgsfeature.h:157:  
note: candidates are: void  
QgsFeature::setGeometryAndOwnership(unsigned char*, size_t)


If I try the same change in qgsfeature.sip, I get:

Parsing SIP files for 'core' library...
/usr/local/bin/sip -c core -b /Users/Shared/src/qgis/svn/qgis-1.0.0p2/ 
build-leoz/python/core/core.sbf -I /usr/local/share/sip/PyQt4 -x  
VendorID -t WS_MACX -x PyQt_NoPrintRangeBug -t Qt_4_4_1 -g /Users/ 
Shared/src/qgis/svn/qgis-1.0.0p2/python/core/core.sip
sip: size_t already defined

and the same compile error (and a lot quicker than with the original  
qgsfeature.sip).


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.




More information about the Qgis-developer mailing list