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

René J.V. Bertin rjvbertin at gmail.com
Fri Dec 12 12:49:17 CET 2014


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 ...

R.



More information about the Interest mailing list