Hi,
We need to know what are the changes we need to follow when we replace main.c with main.cpp in VSCode for nCS 1.7.0
Hi,
We need to know what are the changes we need to follow when we replace main.c with main.cpp in VSCode for nCS 1.7.0
Hello Hitesh,
Thanks for your query.
You can rename the file from .c to .cpp , set configure (.conf) file as CONFIG_CPLUSPLUS=y and you must include main.cpp instead of main.c in CMakeLists.txt.
Here are useful link you can look at- 1. https://docs.zephyrproject.org/latest/samples/subsys/cpp/cpp.html
2. https://docs.zephyrproject.org/latest/samples/subsys/cpp/cpp.html
Hope it helps.
Best Regards,
Kazi Afroza Sultana
Hello Hitesh,
Thanks for your query.
You can rename the file from .c to .cpp , set configure (.conf) file as CONFIG_CPLUSPLUS=y and you must include main.cpp instead of main.c in CMakeLists.txt.
Here are useful link you can look at- 1. https://docs.zephyrproject.org/latest/samples/subsys/cpp/cpp.html
2. https://docs.zephyrproject.org/latest/samples/subsys/cpp/cpp.html
Hope it helps.
Best Regards,
Kazi Afroza Sultana