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

How to add C++ file to nRF9160 project in SES

Hi,

I'm not sure if SES support C++ compiler in nRF9160 project, I did add C++ source in CMakeList:

   target_sources(app PRIVATE src/xxx.cpp)

It won't work, Does anyone know?

Thanks,

Bertie

Parents
  • I too would like to use C++ (it is 2020 after all!). I've set up a test project and on the command line and the support in Zephyr seems remarkably good. You've got C++17 standard compiler, streams, lambdas, containers, string etc. My test binary even runs ok on the nrf9160DK :)

    However, the support for C++ in SES is woeful (despite having a ++ symbol on the icon!). SES just does not recognize cpp files at all and won't even build a project properly that's configured on the command line. Will the Nordic SES version support C++ properly at some point?

    Regards,

    Paul

  • As I mentioned in previous reply.  SES stripped out most C++ headers.  This from CrossWork itself but CrossWorks allows you to setup to use external full GCC. SES is a tripped down version of CrossWorks, not sure it supports that. So forget SES if you want to use C++.

Reply Children
No Data
Related