[Development] Symbol clashes with static Qt libraries

Simon Hausmann Simon.Hausmann at qt.io
Thu Aug 2 15:45:00 CEST 2018


Hi,


Before concluding that a namespaced Qt is a terrible idea, I recommend trying out the feature.


It is intended to work transparently and not require any changes to the application, nothing like having to type MyNS::QString everywhere.


It may be problematic with forward declarations of Qt types, but the fix for that (surrounding with QT_BEGIN/END_NAMESPACE) is entirely compatible between NS and non-NS builds and does not violate the write once goal.



Simon

________________________________
From: Development <development-bounces+simon.hausmann=qt.io at qt-project.org> on behalf of Mathias Hasselmann <mathias at taschenorakel.de>
Sent: Thursday, August 2, 2018 3:41:45 PM
To: development at qt-project.org
Subject: Re: [Development] Symbol clashes with static Qt libraries



Am 31.07.2018 um 14:58 schrieb Edward Welbourne:
> Giuseppe D'Angelo (31 July 2018 14:38)
>> It will likely break every single application that has never used a
>> namespaced build of Qt. Which is a significant percentage of all the Qt
>> apps out there...
>
> I'm guessing you mean "... used a static build of Qt." since they're the
> only ones (b) would change, if made the default.  Otherwise, please
> explain how namespaced builds get broken by this - if they were static
> before, then this just makes them the default, so no change; if they
> weren't static, this change won't affect them.
>
> I can believe static-built apps are common;

You are talking about any single Qt application that's built for iOS.
Even worse: Making statically linked Qt use a namespace by default, but
dynamically linked not would seriously break Qt's "write once, build and
run everywhere" promise as there suddenly would be significant
differences between Qt for iOS and Qt for any other platform.

To me enabling namespaces by default seems like a terrible idea.
A total no-go.

Ciao,
Mathias
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20180802/502c2b89/attachment.html>


More information about the Development mailing list