C
C
corpix2011-03-28 00:45:52
ubuntu
corpix, 2011-03-28 00:45:52

Exception handling disabled, use -fexceptions to enable?

Hello.
I'm writing a virtual keyboard for Linux with some specific tasks (Based on kvkbd, but it doesn't matter for solving the problem).
Error when compiling project with cmake

/home/cx/Workspace/keyboard/trunk/src/customLayout.cpp:130: error: exception handling disabled, use -fexceptions to enable<br/>

Cmake version 2.8.2, Ubuntu 10.10
Googled for similar issues, found some clarifications.
Applied:
cmake -DCMAKE_C_FLAGS=&quot;-g -fexceptions&quot; -DCMAKE_CXX_FLAGS=&quot;-g -fexceptions&quot;<br/>
make VERBOSE=1<br/>

Eventually:
cd /home/cx/Workspace/keyboard/trunk/src && /usr/bin/c++ -D_BSD_SOURCE -g -fexceptions -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -I/home/cx/Workspace/keyboard/trunk/src -I/usr/include/KDE -I/usr/include/qt4/phonon -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4/QtDBus -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4 -o CMakeFiles/kvkbd.dir/customLayout.o -c /home/cx/Workspace/keyboard/trunk/src/customLayout.cpp<br/>

It turns out that both "-fexceptions" and "-fno-exceptions" flags are present.
How to resolve all this?
Link to a topic hosted on the Ubuntu Community Forum

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
justaguest, 2013-12-23
@justaguest

Are the options in the makefile there? Open it in a text editor, find the text -fno-exceptions , and delete it. Or is there some other snag?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question