[Development] Symbol clashes with static Qt libraries
Konstantin Shegunov
kshegunov at gmail.com
Tue Jul 31 15:58:06 CEST 2018
On Tue, Jul 31, 2018 at 2:43 PM, Kai Koehne <Kai.Koehne at qt.io> wrote:
> Hi,
>
> I'm wondering how we can avoid symbol clashes in static Qt libs + user
> code.
>
> a) Prefix all symbols with 'q', like we do for exported symbols.
>
> This requires some bigger patches. See e.g. https://codereview.qt-project.
> org/#/c/235631/ for renaming all logging categories to 'qlc*' in qtbase.
>
Isn't introducing a private namespace for that purpose an option?
I think it'd fare better than renaming the symbols, and in the end that's
the whole reason for having them in the language, right?
Granted there should be an using clause at the top of the sources that use
those private methods and explicit scoping for public headers (if any), but
that should solve the problem I believe. Also patching it up should be
relatively straightforward.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20180731/a8474e7f/attachment.html>
More information about the Development
mailing list