This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

error: expected declaration specifiers or '...' before string constant

Hello,

For BLE mesh light_switch example, the following statement is showing error.

In app_config.h

#define NRF_SDH_ENABLED 0

In sdk_config.h

#ifndef NRF_SDH_ENABLED
#define NRF_SDH_ENABLED 0
#endif

The error is as below:

error: expected declaration specifiers or '...' before string constant

Even after changing the value to 1, the error persists.

Could you please suggest the correction.

Thanks

Related