[QGIS-Developer] Build issue and SIP_CONCAT_PARTS

Julien Cabieces julien.cabieces at oslandia.com
Wed May 26 06:43:55 PDT 2021


Hi devs, 

I'm working on a new QGIS feature and wanted to add a new API in core module. I get a strange error when building, on a class not related to what I am adding.

/home/julien/work/QGIS/build_debug/python/core/sip_corepart11.cpp:272:67: error: no type named 'QgsOptionalQgsExpressionBase' in the global namespace; did you mean 'QgsOptionalExpression'?
     ::QgsOptionalQgsExpressionBase *sipCpp = reinterpret_cast< ::QgsOptionalQgsExpressionBase *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QgsOptionalQgsExpressionBase));

It said that QgsOptionalExpressionBase is not defined in
sip_corepart_11.cpp, but the typedef is actually in sip_corepart_10.cpp,
at the end of the file.

>From what I understand, CMakeList variable SIP_CONCAT_PARTS allows to
split the SIP generated cpp code in several module, but in this case it
looks like split happens on a bad location (typedef on one side, part of
the code on the other side).

If I set SIP_CONCAT_PARTS to 1, it works.

Has anyone already facing this kind of issue? Is there some sort of instruction that I should be aware of to solve this?

I'm on master, Debian Bullseye, SIP 4.19.25

Kind regards,
Julien


More information about the QGIS-Developer mailing list