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.ke...@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
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest