Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile ESP BLE MESH with CPP/C++ (IDFGH-11072) #12015

Open
3 tasks done
heculess opened this issue Aug 4, 2023 · 2 comments
Open
3 tasks done

Cannot compile ESP BLE MESH with CPP/C++ (IDFGH-11072) #12015

heculess opened this issue Aug 4, 2023 · 2 comments
Assignees
Labels
Status: Opened Issue is new Type: Bug bugs in IDF

Comments

@heculess
Copy link

heculess commented Aug 4, 2023

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1

Operating System used.

Windows

How did you build your project?

Command line with Make

If you are using Windows, please specify command line type.

CMD

What is the expected behavior?

compile complete

What is the actual behavior?

compile failed

Steps to reproduce.

cd ble_mesh_sensor_model\sensor_server
change main.c to main.cpp
change main.cpp to compile with C++
get error

Build or installation Logs.

E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:16: error: expected identifier before numeric constant
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: In lambda function:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:61: error: expected '{' before '=' token
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                             ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: At global scope:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:65:51: error: no match for 'operator=' (operand types are '<lambda()>' and 'int')
   65 | #define ESP_BLE_MESH_KEY_UNUSED                   0xFFFF
      |                                                   ^~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:269:13: note: in expansion of macro 'ESP_BLE_MESH_KEY_UNUSED'
  269 |             ESP_BLE_MESH_KEY_UNUSED },                              \
      |             ^~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:59: note: candidate: 'constexpr<lambda()>&<lambda()>::operator=(const<lambda()>&)'
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                           ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:59: note:   no known conversion for argument 1 from 'int' to 'const<lambda()>&'
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                           ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:18: error: expected identifier before numeric constant
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                  ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: In lambda function:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:65: error: expected '{' before '=' token
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                                 ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: At global scope:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:59:51: error: no match for 'operator=' (operand types are '<lambda()>' and 'int')
   59 | #define ESP_BLE_MESH_ADDR_UNASSIGNED              0x0000
      |                                                   ^~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:272:13: note: in expansion of macro 'ESP_BLE_MESH_ADDR_UNASSIGNED'
  272 |             ESP_BLE_MESH_ADDR_UNASSIGNED },                         \
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:63: note: candidate: 'constexpr<lambda()>&<lambda()>::operator=(const<lambda()>&)'
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                               ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:63: note:   no known conversion for argument 1 from 'int' to 'const<lambda()>&'
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                               ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:27:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   27 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_SRV,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:71:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_SRV'
   71 |     ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:16: error: expected identifier before numeric constant
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: In lambda function:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:61: error: expected '{' before '=' token
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                             ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: At global scope:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:65:51: error: no match for 'operator=' (operand types are '<lambda()>' and 'int')
   65 | #define ESP_BLE_MESH_KEY_UNUSED                   0xFFFF
      |                                                   ^~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:269:13: note: in expansion of macro 'ESP_BLE_MESH_KEY_UNUSED'
  269 |             ESP_BLE_MESH_KEY_UNUSED },                              \
      |             ^~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:59: note: candidate: 'constexpr<lambda()>&<lambda()>::operator=(const<lambda()>&)'
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                           ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:59: note:   no known conversion for argument 1 from 'int' to 'const<lambda()>&'
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                           ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:18: error: expected identifier before numeric constant
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                  ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: In lambda function:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:65: error: expected '{' before '=' token
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                                 ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: At global scope:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:59:51: error: no match for 'operator=' (operand types are '<lambda()>' and 'int')
   59 | #define ESP_BLE_MESH_ADDR_UNASSIGNED              0x0000
      |                                                   ^~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:272:13: note: in expansion of macro 'ESP_BLE_MESH_ADDR_UNASSIGNED'
  272 |             ESP_BLE_MESH_ADDR_UNASSIGNED },                         \
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:63: note: candidate: 'constexpr<lambda()>&<lambda()>::operator=(const<lambda()>&)'
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                               ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:63: note:   no known conversion for argument 1 from 'int' to 'const<lambda()>&'
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                               ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_config_model_api.h:41:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   41 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_CONFIG_CLI,          \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:72:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_CFG_CLI'
   72 |     ESP_BLE_MESH_MODEL_CFG_CLI(&config_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:16: error: expected identifier before numeric constant
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: In lambda function:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:61: error: expected '{' before '=' token
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                             ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: At global scope:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:65:51: error: no match for 'operator=' (operand types are '<lambda()>' and 'int')
   65 | #define ESP_BLE_MESH_KEY_UNUSED                   0xFFFF
      |                                                   ^~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:269:13: note: in expansion of macro 'ESP_BLE_MESH_KEY_UNUSED'
  269 |             ESP_BLE_MESH_KEY_UNUSED },                              \
      |             ^~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:59: note: candidate: 'constexpr<lambda()>&<lambda()>::operator=(const<lambda()>&)'
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                           ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:268:59: note:   no known conversion for argument 1 from 'int' to 'const<lambda()>&'
  268 |     .keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] =       \
      |                                                           ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:18: error: expected identifier before numeric constant
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                  ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: In lambda function:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:65: error: expected '{' before '=' token
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                                 ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp: At global scope:
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:59:51: error: no match for 'operator=' (operand types are '<lambda()>' and 'int')
   59 | #define ESP_BLE_MESH_ADDR_UNASSIGNED              0x0000
      |                                                   ^~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:272:13: note: in expansion of macro 'ESP_BLE_MESH_ADDR_UNASSIGNED'
  272 |             ESP_BLE_MESH_ADDR_UNASSIGNED },                         \
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:63: note: candidate: 'constexpr<lambda()>&<lambda()>::operator=(const<lambda()>&)'
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                               ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h:271:63: note:   no known conversion for argument 1 from 'int' to 'const<lambda()>&'
  271 |     .groups = { [0 ... (CONFIG_BLE_MESH_MODEL_GROUP_COUNT - 1)] =   \
      |                                                               ^
E:/esp-idf/frameworks/esp-idf-v5.1/components/bt/esp_ble_mesh/api/models/include/esp_ble_mesh_sensor_model_api.h:33:9: note: in expansion of macro 'ESP_BLE_MESH_SIG_MODEL'
   33 |         ESP_BLE_MESH_SIG_MODEL(ESP_BLE_MESH_MODEL_ID_SENSOR_CLI,    \
      |         ^~~~~~~~~~~~~~~~~~~~~~
E:/ble_mesh_sensor_model/sensor_client/main/ble_mesh_gateway.cpp:73:5: note: in expansion of macro 'ESP_BLE_MESH_MODEL_SENSOR_CLI'
   73 |     ESP_BLE_MESH_MODEL_SENSOR_CLI(NULL, &sensor_client),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

More Information.

No response

@heculess heculess added the Type: Bug bugs in IDF label Aug 4, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Sep 14, 2023
@github-actions github-actions bot changed the title Cannot compile ESP BLE MESH with CPP/C++ Cannot compile ESP BLE MESH with CPP/C++ (IDFGH-11072) Sep 14, 2023
@chegewara
Copy link
Contributor

The link is not helpful in this case at all.
I have the same issues with 5.1 and 5.2, but its has been solved/fixed in v5.3 (master), hopefully for good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

5 participants