[Development] Fixing the DLL/shared/static mess

Stephen Kelly stephen.kelly at kdab.com
Sun Apr 15 23:59:55 CEST 2012


On Friday, April 13, 2012 13:55:04 Thiago Macieira wrote:
> > 4) Packagers who package only one type of Qt build (shared or static,
> > but
> > not both), should not see any changes either. One Qt build means a set
> > of
> > library files and the headers (e.g.: libQtCore.so and qconfig.h).
> 
> THIS IS A PROPOSAL
> 
> A static-and-shared build of Qt is currently not supported. There are no
> plans to accomplish this with the current buildsystem in one build.

Hmm, when I worked on the CMake buildsystem files, I thought static-and-shared 
was the default on Mac (or maybe it was Windows), or I had to support it for 
that reason. Has that changed or am I imagining/misremembering it?

I also (mis)remember that this shared_and_static option doesn't work on linux 
at all? Is this a mac-only feature?

> Buildsystems should be changed to support compile-time selection of which
> one to link to.
> 
> For qmake, the proposed solution is:
> CONFIG += prefer_shared_qt
> CONFIG += prefer_static_qt
> 
> prefer_shared_qt is a no-op, since it's the default
> 
> prefer_static_qt defines QT_STATIC and must also use a static linking form:
> 
> 	-static -lQtQml -lQtGui -lQtCore -shared $dependent_libs

The CMake equivalent would probably be a Qt5$${MODULE}_USE_STATIC_LIBS option. 
I'll look into it.

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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120415/f5cb31b3/attachment.html>
-------------- 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/development/attachments/20120415/f5cb31b3/attachment.sig>


More information about the Development mailing list