How to import header files in the zephyr\subsys\bluetooth\mesh\shell path in a project

zephyr\subsys\bluetooth\mesh

zephyr\subsys\bluetooth\mesh\shell

I need to use APIs for certain files in the path mentioned above. Currently, I can only copy the files I need to use to the project folder in order to import and call them. Can I directly call the source files in NCS by modifying cmake or other methods, without having to copy these files to the project folder every time?

Parents
  • You should not be needing to copy library files into your project, instead you should just include them in your prj.conf.

    For example, if you need shell extension in your project, you just need to add the below in your prj.conf and all the files are imported into your project to compile. You still need to add the header files in the files where you use the shell API.like #include <zephyr/bluetooth/mesh/shell.h>

    In prj.conf, you just add

    CONFIG_BT_MESH_SHELL=y

Reply
  • You should not be needing to copy library files into your project, instead you should just include them in your prj.conf.

    For example, if you need shell extension in your project, you just need to add the below in your prj.conf and all the files are imported into your project to compile. You still need to add the header files in the files where you use the shell API.like #include <zephyr/bluetooth/mesh/shell.h>

    In prj.conf, you just add

    CONFIG_BT_MESH_SHELL=y

Children
No Data
Related