[PyQt] PyQt 5.5: iOS Build undefined symbols: QMacCocoaViewContainer

David Morris othalan at othalan.net
Fri Sep 4 19:10:53 BST 2015


I am building an iOS application using Qt 5.3.2 & PyQt 5.3.2.  This works.

However, if I build the app using Qt 5.5 & PyQt 5.5.1 (developer
snapshot), I get a large list of undefined symbols when the
application links, all related to QMacCocoaViewContainer.

I am guessing QMacCocoaViewContainer is related to OSX only and should
not exist on iOS.  Searching for a solution, it appears this was added
to PyQt in 5.4.1 or 5.4.2.

How can I either link in the missing library or remove it from the iOS build?

Here is the full list of undefined references for the arm64 build:

Undefined symbols for architecture arm64:
  "QMacCocoaViewContainer::staticMetaObject", referenced from:
      _sipTypeDef_QtWidgets_QMacCocoaViewContainer in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
  "typeinfo for QMacCocoaViewContainer", referenced from:
      typeinfo for sipQMacCocoaViewContainer in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
  "QMacCocoaViewContainer::cocoaView() const", referenced from:
      meth_QMacCocoaViewContainer_cocoaView(_object*, _object*) in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
  "QMacCocoaViewContainer::QMacCocoaViewContainer(NSView*, QWidget*)",
referenced from:
      init_type_QMacCocoaViewContainer(_sipSimpleWrapper*, _object*,
_object*, _object**, _object**, _object**) in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
  "QMacCocoaViewContainer::setCocoaView(NSView*)", referenced from:
      meth_QMacCocoaViewContainer_setCocoaView(_object*, _object*) in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
  "QMacCocoaViewContainer::qt_metacast(char const*)", referenced from:
      sipQMacCocoaViewContainer::qt_metacast(char const*) in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
  "QMacCocoaViewContainer::qt_metacall(QMetaObject::Call, int,
void**)", referenced from:
      sipQMacCocoaViewContainer::qt_metacall(QMetaObject::Call, int,
void**) in libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
  "QMacCocoaViewContainer::~QMacCocoaViewContainer()", referenced from:
      sipQMacCocoaViewContainer::~sipQMacCocoaViewContainer() in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
      non-virtual thunk to
sipQMacCocoaViewContainer::~sipQMacCocoaViewContainer() in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
      sipQMacCocoaViewContainer::~sipQMacCocoaViewContainer() in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)
      non-virtual thunk to
sipQMacCocoaViewContainer::~sipQMacCocoaViewContainer() in
libQtWidgets.a(sipQtWidgetsQMacCocoaViewContainer.o)

Thank you,
David


More information about the PyQt mailing list