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

David Morris othalan at othalan.net
Mon Sep 7 17:32:36 BST 2015


On Mon, Sep 7, 2015 at 3:55 AM, Phil Thompson
<phil at riverbankcomputing.com> wrote:
> On 4 Sep 2015, at 7:10 pm, David Morris <othalan at othalan.net> wrote:
> >
> > 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?
>
> The easiest way is to comment out the %Include qmaccocoaviewcontainer.sip from QtWidgetsmod.sip.

Phil,
Thank you, that got me looking in the right place.  I also needed to
comment out a few lines in QtWidgets/qapplication.sip.  But I now have
the app compiling with PyQt5!

It looks like both files should have the relevant code wrapped in a
"#ifdef Q_OS_OSX".  (qapplication.sip uses Q_OS_MAC, which is for both
OSX and iOS).
Assuming, of course, I am right that QMAcCocoaViewContainer should not
be used on iOS.

Is there somewhere I can report this bug?

Thank you,

David


More information about the PyQt mailing list