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

C++ compilation error using CLI with SDK 14: error: expected declaration before '}' token

Hi, i just renamed main.c to main.cpp.

In file included from ../../../main.cpp:57:0:
../../../../../../components/libraries/experimental_cli/nrf_cli.h:597:1: error: expected declaration before '}' token
 }
 ^

What should be the right way to fix that?

If i put all the include to extern "C" i get:

Compiling file: main.cpp
../../../main.cpp:81:1: error: expected declaration before '}' token
 }
 ^

Thanks.

Parents Reply Children
Related