[Interest] My experience porting to Qt5 (on OS X)

Stephen Kelly stephen.kelly at kdab.com
Thu Sep 13 11:18:51 CEST 2012


On Thursday, September 13, 2012 10:26:03 Thiago Macieira wrote:
> On quinta-feira, 13 de setembro de 2012 10.19.34, Stephen Kelly wrote:
> > > And if I would
> > > forget to say QT += widgets in "model.pro", I'd simply get a linker
> > > error.
> > 
> > Only if you attempt to use something from the header which requires
> > linking.
> Also note that, by default, linking on ELF platforms does not error out in
> case of undefined symbols. Your library might link and you'll never notice
> the error until you run with an application that doesn't link to QtWidgets
> or to libraries that do.
> 
> If you want to catch this error, add to your .pro file:
> QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF

... which is the qmake/portable equivalent of what I recommended:

linux-host-g++/qmake.conf:QMAKE_LFLAGS_NOUNDEF    += -Wl,--no-undefined

Thanks,

-- 
Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120913/c164f9c9/attachment.sig>


More information about the Interest mailing list