A further observation...

On 10/12/20 12:14 PM, Stephen Morris via PySide wrote:

Following an apparently successful build of Qt 5.15.1 and PySide2 5.15.1 from 
source, I'm now attempting to compile the application which I was previously 
compiling using version 5.12.5.

I get a slew of error messages involving PySide Properties:

<myproject>_wrapper.cpp: In function 'int 
Sbk_icp_RenderWindow_setattro(PyObject*, PyObject*, PyObject*)':
<myproject>_wrapper.cpp:1984:66: error: 'PySide::Property' has not been declared
     Shiboken::AutoDecRef pp(reinterpret_cast<PyObject 
*>(PySide::Property::getObject(self, name)));
                                                                  ^~~~~~~~
<myproject>_wrapper.cpp:1986:24: error: 'PySide::Property' has not been declared
         return PySide::Property::setValue(reinterpret_cast<PySideProperty 
*>(pp.object()), self, value);
                        ^~~~~~~~
<myproject>_wrapper.cpp:1986:60: error: 'PySideProperty' does not name a type; 
did you mean 'QMetaProperty'?
         return PySide::Property::setValue(reinterpret_cast<PySideProperty 
*>(pp.object()), self, value);
                                                            ^~~~~~~~~~~~~~
                                                            QMetaProperty
<myproject>_wrapper.cpp:1986:75: error: expected '>' before '*' token
         return PySide::Property::setValue(reinterpret_cast<PySideProperty 
*>(pp.object()), self, value);
                                                                           ^
<myproject>_wrapper.cpp:1986:75: error: expected '(' before '*' token
         return PySide::Property::setValue(reinterpret_cast<PySideProperty 
*>(pp.object()), self, value);
                                                                           
<myproject>
                                                                           (
<myproject>_wrapper.cpp:1986:76: error: expected primary-expression before '>' 
token
         return PySide::Property::setValue(reinterpret_cast<PySideProperty 
*>(pp.object()), self, value);
                                                                            ^
Is this likely to be a problem with my PySide2 build, or do I need to update my 
project's syntax?

Thank you,
Stephen Morris.

I can eliminate the compile error by opening up the auto-generated wrapper file 
"<myproject>_wrapper.cpp" and manually inserting:

    #include "pysideproperty.h"

... near the beginning. However, it still doesn't get me out of the woods 
because when I try to import the resulting module from Python I get a link 
error:

Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File 
".../lib/python2.7/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
 line 146, in _import
    return original_import(name, *args, **kwargs)
ImportError: .../lib/python2.7/<mylibrary>.so: undefined symbol: 
_ZN6PySide8Property8setValueEP14PySidePropertyP7_objectS4_

I've revisited the successful build of the my project using Qt and PySide 
version 5.12.5, and the <myproject>_wrapper.cpp file generated there makes no 
reference to PySideProperty.

In general the versions of the wrapper file generated by versions 5.12.5 and 
5.15.1 of Shiboken diverge quite substantially, despite being generated from 
the same sources, so it's very hard to tell why the PySideProperty dependance 
has been introduced, or what to do about it.


_______________________________________________
PySide mailing list
PySide@qt-project.org
https://lists.qt-project.org/listinfo/pyside

Reply via email to