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

Can't clear error "expected declaration specifiers or '...' before numeric constant"

I am trying to build a solution based on the nrf_ble_uart_c example.  Building has been working fine until I added pin configuration statements.

I've tried relocating the code statements, using variables vs actual port/pin numbers, retyping the lines, removing all comments, many syntax variations and everything else I could think of.  Yet this error persists. 

I am using SDK 15.3, SES 4.10 and tried 4.30.   

Please advise.

Parents
  • Hello,

    It is a bit difficult to tell from your screenshot, but the interresting parts are:

    1: What is the first warning/error you get? Are these the first?

    2: Where is this in your project? Are nrf_gpio_output_set() called from outside a function? Or is all the code in your screenshot inside a function? I suspect the first, and that is not allowed in C programming. All function calls needs to be inside a function.

    BR,

    Edvin

Reply
  • Hello,

    It is a bit difficult to tell from your screenshot, but the interresting parts are:

    1: What is the first warning/error you get? Are these the first?

    2: Where is this in your project? Are nrf_gpio_output_set() called from outside a function? Or is all the code in your screenshot inside a function? I suspect the first, and that is not allowed in C programming. All function calls needs to be inside a function.

    BR,

    Edvin

Children
Related