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

Build example project using C++11 with SEGGER_IDE failed

Hi, in these days I want use the new feature of C++11 in nrf52 project, so I rename the "main.c" file to "main.cpp"(ble_app_blinky project), select the C++11 compiler in project options dialog,

then start building, it failed and the infomation is: 

Look forward to your reply。

Parents
  • Yes, it is well known that the standard Nordic code will not build as C++

    There has been a number of threads on it ... 

  • Hi awneil,

    It is not so easy as one may think to support C99 and various of C++ standards for all compilers: Keil, GCC, SES, IAR.

    Currently I am porting one library to be C++ compatible and I am facing C++ standard issues. What compiles in older C++ standards won't compile beginning from C++ 11 but it will compile in C++ 20. And the build result is diffrent depending on used compiler (in terms of building/not building).
    So far Nordic is officially supporting C but we have recently started making C++ friendly code as much as possible. However migrating all available libraries to C++ is rather not feasable.

Reply
  • Hi awneil,

    It is not so easy as one may think to support C99 and various of C++ standards for all compilers: Keil, GCC, SES, IAR.

    Currently I am porting one library to be C++ compatible and I am facing C++ standard issues. What compiles in older C++ standards won't compile beginning from C++ 11 but it will compile in C++ 20. And the build result is diffrent depending on used compiler (in terms of building/not building).
    So far Nordic is officially supporting C but we have recently started making C++ friendly code as much as possible. However migrating all available libraries to C++ is rather not feasable.

Children
Related