This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Code in C++ NRF52 series with Keil uV5

Hello, 

I am trying code (and compile) in C++ with a NRF52832 on Keil UV5.

In the C/C++ options i don't see the compiler option for the preferred language when I open a project form the SDK15.

when I create a test project, I can choose whether the compiler is in C or C++.

I also tried in the Misc Controls to add –cpp11 but then all the Nordic libraries can’t compile.

Is there any tutorial on how to do it? I found a few threads in the Devzone that talked about this but no clear answer.

Thank you for your help.

Parents
  • Hi,

    The nRF5 SDK is not tested with C++ compilers, it is not officially supported, and we know it use some constructs that are not valid C++. Hence, you cannot configure the project as a whole as a C++ project. That said, it should be possible to build your application files as C++ and the SDK files itself as C, but you may see a variety of issues. See for instance this old post.

    PS: The nRF Connect SDK supports C++.

Reply
  • Hi,

    The nRF5 SDK is not tested with C++ compilers, it is not officially supported, and we know it use some constructs that are not valid C++. Hence, you cannot configure the project as a whole as a C++ project. That said, it should be possible to build your application files as C++ and the SDK files itself as C, but you may see a variety of issues. See for instance this old post.

    PS: The nRF Connect SDK supports C++.

Children
No Data
Related