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

How to add a header file to the nRF9160&Zephyr project

Hi, everyone,

now I'm test "\ncs\nrf\samples\nrf9160\gps\build_nrf9160_pca10090",

it's error about"nrf_socket.h: No such file or directory"

I'm find the file at "/ncs/nrfxlib/bsdlib/include/nrf_socket.h", But how can i add this path?

And I want know,How a header file path is added to the project.

by ninja/env/cmake? How does he work?

The same question,How can i add a source code or directory to my project.

Please tell me,Thank you!

Best Regards

My SES V4.18,ncs release-notes-1.0.0

Parents Reply
  • To add header files and source code, create a new directory called 'include' and add all your header files. Then add your .c files in the 'src' directory. The just include the header files you want to use in the 'main.c' file. 

    This tutorial has a guide on how to create an application from scratch using ncs. 

    And you are correct, 'ns' means 'non secure', and some of the libraries (for example bsdlib) have only been written for the non secure version.


    Best regards,

    Heidi

Children
Related