You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
D:/Projetos/M5Stack/M5Cardputer-UserDemo/main/apps/app_ir/app_ir.cpp: In member function 'void MOONCAKE::APPS::AppIR::_update_state()':
D:/Projetos/M5Stack/M5Cardputer-UserDemo/main/apps/app_ir/app_ir.cpp:170:41: error: exception handling disabled, use -fexceptions to enable
catch(const std::exception& e)
^
D:/Projetos/M5Stack/M5Cardputer-UserDemo/main/apps/app_ir/app_ir.cpp:173:50: error: 'e' was not declared in this scope
spdlog::info("parse failed: {}", e.what());
^
[1129/1257] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/apps/app_keyboard/app_keyboard.cpp.obj
In file included from D:/Projetos/M5Stack/M5Cardputer-UserDemo/main/apps/app_keyboard/app_keyboard.cpp:13:
d:\projetos\m5stack\m5cardputer-userdemo\main\apps\utils\wifi_common_test\wifi_common_test.h:19:17: warning: 'WIFI_COMMON_TEST::is_nvs_inited' defined but not used [-Wunused-variable]
static bool is_nvs_inited = false;
^~~~~~~~~~~~~
[1132/1257] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/apps/app_repl/app_repl.cpp.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
@jadielsousa
Error message you provided indicates that the ESP-IDF framework does not have exception handling enabled by default. You need to enable exceptions by adding the -fexceptions flag to your compiler settings.
Something like this set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
Since exception handling is not enabled, variable e inside the catch experssion is not decleared, so the second error is caused error: 'e' was not declared in this scope. Once you have fixed the issue mentioned above, it should be fine.
Tested with ESP-IDF v4.4.6 under WSL. The full firmware builds successfully with the repository’s sdkconfig. Disabling C++ exceptions reproduces the exact errors reported here.
Please run idf.py menuconfig, enable Compiler options → Enable C++ exceptions (CONFIG_COMPILER_CXX_EXCEPTIONS=y), save, then run:
idf.py fullclean build
This option is already enabled in the repository’s configuration. Closing as a configuration issue. If the problem persists with exceptions enabled, please reopen and share your sdkconfig and full build log.
Activity
JohnZ03 commentedon Oct 25, 2024
@jadielsousa
Error message you provided indicates that the ESP-IDF framework does not have exception handling enabled by default. You need to enable exceptions by adding the -fexceptions flag to your compiler settings.
Something like this
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")Since exception handling is not enabled, variable
einside the catch experssion is not decleared, so the second error is causederror: 'e' was not declared in this scope. Once you have fixed the issue mentioned above, it should be fine.Forairaaaaa commentedon Nov 5, 2026
Tested with ESP-IDF v4.4.6 under WSL. The full firmware builds successfully with the repository’s
sdkconfig. Disabling C++ exceptions reproduces the exact errors reported here.Please run
idf.py menuconfig, enable Compiler options → Enable C++ exceptions (CONFIG_COMPILER_CXX_EXCEPTIONS=y), save, then run:This option is already enabled in the repository’s configuration. Closing as a configuration issue. If the problem persists with exceptions enabled, please reopen and share your
sdkconfigand full build log.