[Resolved] Compilation problem: "Exception Handling disabled, use -fexceptions to enable"



  • Well, I install the last version of Qt (Qt 4.8.3, MinGW 2012-04-27 with gcc-4.6.2-1), and when I try to compile my application, I got this error:

    "Exception Handling disabled, use -fexceptions to enable"

    See the code:
    @
    try {
    ....
    } catch (...) {
    retorno = false;
    }
    @

    I try to add the "-fexceptions" on field "additional parameters:" but the qmake shows me another error, appears that qmake don't recognize the parameter "-fexceptions".

    I don't know how to fix it.. Maybe removing the try/cath,... but I don't want to change that!



  • I hit the same problem today when I attempted to build my app with MinGW for the first time.

    I got around the problem by adding the following line to my .pro file:

    CONFIG += exceptions



  • Thanks TheloniousBonk, this solved my problem!
    Now appears other:

    @
    process_begin: CreateProcess(NULL, bin\rcc.exe -name Resources ..\SistemaAssistenciaTecnica\Resources.qrc -o debug\qrc_Resources.cpp, ...) failed.
    make (e=2): O sistema não pode encontrar o arquivo especificado.
    mingw32-make[1]: *** [debug/qrc_Resources.cpp] Error 2
    mingw32-make: *** [debug] Error 2
    09:33:48: The process "C:\MinGW\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project InoveBEV (target: Desktop)
    When executing step 'Make'
    @

    [quote author="TheloniousBonk" date="1352509613"]I hit the same problem today when I attempted to build my app with MinGW for the first time.

    I got around the problem by adding the following line to my .pro file:

    CONFIG += exceptions
    [/quote]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.