Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Resolved] Compilation problem: "Exception Handling disabled, use -fexceptions to enable"
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 7.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dcbasso
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TheloniousBonk
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dcbasso
        wrote on last edited by
        #3

        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]

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved