Hi Nordic team,
Please guide to resolve the error .
While trying to convert the model_handler.c to model_handler.cpp the below deceleration shows multiple compilation errors
static struct bt_mesh_elem elements[] = {
BT_MESH_ELEM(
1,
BT_MESH_MODEL_LIST(
BT_MESH_MODEL_CFG_SRV,
BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub)),
BT_MESH_MODEL_LIST(BT_MESH_MODEL_HELLO_BLE_COMM(&chat))),
};
Compilation Errors Are:
expected primary-expression before 'struct'
in definition of macro 'ARRAY_SIZE'
in expansion of macro 'BT_MESH_ELEM'
in expansion of macro 'BT_MESH_MODEL_LIST'
expected ')' before 'struct'
in definition of macro 'ARRAY_SIZE'
in expansion of macro 'BT_MESH_ELEM'
in expansion of macro 'BT_MESH_MODEL_LIST'
expected primary-expression before 'struct'
in definition of macro 'ARRAY_SIZE'
in expansion of macro 'BT_MESH_ELEM'
in expansion of macro 'BT_MESH_MODEL_LIST'
expected ')' before 'struct'
in definition of macro 'ARRAY_SIZE'
in expansion of macro 'BT_MESH_ELEM'
in expansion of macro 'BT_MESH_MODEL_LIST'
mesh.h
expected primary-expression before 'struct'
in definition of macro 'BT_MESH_ELEM'
in expansion of macro 'BT_MESH_MODEL_LIST'
expected ')' before 'struct'
in definition of macro 'BT_MESH_ELEM'
in expansion of macro 'BT_MESH_MODEL_LIST'
Location of Error showed at model.h : #define BT_MESH_MODEL_LIST(...) ((struct bt_mesh_model[]){ __VA_ARGS__ })
Thanks
Selvam
