[Interest] to -fno-exceptions or not ...

Thiago Macieira thiago.macieira at intel.com
Fri Dec 12 18:14:52 CET 2014


On Friday 12 December 2014 12:49:17 René J.V. Bertin wrote:
> On Thursday December 11 2014 15:25:55 Thiago Macieira wrote:
> > On Thursday 11 December 2014 21:33:35 René J.V. Bertin wrote:
> > > But how do I turn exceptions back on in xmlpatterns.pro? Do I add
> > > -UQT_NO_EXCEPTIONS to the compiler flags (and cross thumbs), or is there
> > > a
> > > better way?
> > 
> > CONFIG += exceptions
> 
> Thanks, but it appears necessary to add
> 
> QMAKE_CXXFLAGS_EXCEPTIONS_OFF -= -fno-exceptions
> QMAKE_CFLAGS -= -fno-exceptions
> QMAKE_CXXFLAGS -= -fno-exceptions
> QMAKE_LFLAGS -= -fno-exceptions
> 
> in order to get rid of the compiler option.
> 
> And then there's the not-so-perfect ABI compatibility:
> 
> dlsym: can't open /opt/local/share/qt4/plugins/styles/qtcurve.so
> (dlopen(/opt/local/share/qt4/plugins/styles/qtcurve.so, 5): Symbol not
> found: __ZTIN12QtConcurrent9ExceptionE Referenced from:
> /opt/local/lib/libkdeui.5.dylib
>   Expected in:
> /opt/local/Library/Frameworks/QtCore.framework/Versions/4/QtCore in
> /opt/local/lib/libkdeui.5.dylib)
> #> # demangle _ZTIN12QtConcurrent9ExceptionE
> _ZTIN12QtConcurrent9ExceptionE -> "typeinfo for QtConcurrent::Exception"
> 
> I guess QtXmlPatterns isn't the only component that requires exceptions ...

Right. QtConcurrent doesn't need it, but it does offer support for catching an 
exception in a thread and rethrowing it in the future's thread. In Qt 4, it is 
in QtCore.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list