Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

error #94

When compiling (after the project folder change and paths updating) I get always this error.

No idea why. The C99 option is choose

It compiles correctly from SDK tree.

I suppose a problem in sdk_config.h

What is a correct file? There is one in examples section (136k)  and one in main folder/config directory (205k)

compiling main.c...
..\..\..\components\ble\nrf_ble_gatt\nrf_ble_gatt.h(131): error:  #94-D: the size of an array must be greater than zero
      nrf_ble_gatt_link_t        links[
RF_BLE_GATT_LINK_COUNT];  //!< GATT related information for all active connections.
..\..\..\main.c(99): error:  #94: the size of an array must be greater than zero
 
LE_LBS_DEF(m_lbs);                                                             /**< LED Button Service instance. */
..\..\..\main.c(100): error:  #94: the size of an array must be greater than zero
 
RF_BLE_GATT_DEF(m_gatt);                                                       /**< GATT module instance. */
..\..\..\main.c(463): error:  #94: the size of an array must be greater than zero
      
RF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
..\..\..\main.c(463): error:  #94: the size of an array must be greater than zero
      
RF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
..\..\..\main.c: 0 warnings, 5 errors
compiling ble_conn_state.c...
..\..\..\components\ble\common\ble_conn_state.c(265): error:  #94: the size of an array must be greater than zero
 
RF_SDH_BLE_OBSERVER(m_ble_evt_observer, BLE_CONN_STATE_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
..\..\..\components\ble\common\ble_conn_state.c: 0 warnings, 1 error

Related