[Development] Symbol clashes with static Qt libraries

André Pönitz apoenitz at t-online.de
Fri Aug 3 07:19:09 CEST 2018


On Fri, Aug 03, 2018 at 08:27:50AM +0200, Olivier Goffart wrote:
> > The problem we had with a namespaced Qt were: using external Qt
> > based libraries, which never tried to use a namespaced build, did
> > not build due to forward declarations, so I had to patch some of
> > them.  But then, not all external library projects liked these
> > patches so we'd have to patch them on our own increasing the
> > workload when upgrading ...  Also, when using squish you can no
> > longer use a prebuilt version and have to compile squish from
> > sources including also the namespace AFAIR.
> > 
> > Eventually we could go back to non-namespaced builds, which makes
> > your life simpler.
> 
> Ideally, we should deprecate forward declarations of Qt classes.  We
> should have a forwarding header, generated by syncqt, which would
> fordward declare all classes on a module.  So one would do #include
> <QtCoreFwd> to forward declare all classes in QtCore.

I would not *deprecate* forward declarations, but having the
*Fwd headers would be really nice, also for the examples,
as using QT_{DEGIN,END}_NAMESPACE there makes Qt look quirky,
and using full includes makes it look inefficient.

Andre'



More information about the Development mailing list