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. error: cannot use 'throw' with exceptions disabled throw error_t (); ^
Forum Updated to NodeBB v4.3 + New Features

error: cannot use 'throw' with exceptions disabled throw error_t (); ^

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 1.1k Views
  • 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.
  • R Offline
    R Offline
    RahibeMeryem
    wrote on last edited by
    #1

    Hi,

    I try to use zeromq with my qt project. linked like:

    LIBS +=-L/usr/local/lib/ -lzmq
    INCLUDEPATH +=/usr/local/include

    But it gives error :

    /usr/local/include/zmq.hpp:152:13: error: cannot use 'throw' with exceptions disabled
                throw error_t ();
                ^
    

    I added to the pro file :

    CONFIG-=exceptions
    
    

    Still same problem.

    Any idea _

    jsulmJ 1 Reply Last reply
    0
    • R RahibeMeryem

      Hi,

      I try to use zeromq with my qt project. linked like:

      LIBS +=-L/usr/local/lib/ -lzmq
      INCLUDEPATH +=/usr/local/include

      But it gives error :

      /usr/local/include/zmq.hpp:152:13: error: cannot use 'throw' with exceptions disabled
                  throw error_t ();
                  ^
      

      I added to the pro file :

      CONFIG-=exceptions
      
      

      Still same problem.

      Any idea _

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @RahibeMeryem said in error: cannot use 'throw' with exceptions disabled throw error_t (); ^:

      CONFIG-=exceptions

      Apparently it has to be

      CONFIG+=exceptions
      

      if you want to use exceptions...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

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