This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to make SDK 17.0.2 dependencies dynamic

    Hello,

I was working with the SDK 17.0.2 development kit and combined a few examples.  When adding dependencies from other examples the path is entirely contained within the SDK folder, but when sharing the folder with all files to another person the build fails unless the other person has the SDK folder in the same directory as me.  For example:

my location: D:/SDK/../..

Their location: C:/SDK/../.. 

The build fails on their location as the dependencies are statically linked to my location on D and do not find the files in C.  The only way we've gotten it to work so far is having their entire directory structure exactly match mine.  How do I make this fully dynamic so that the above setup would work with the SDK on either C or D or in any other number of directories so that the folder can be transferred or shared within a git repo?

Thanks

Parents
  • Hello Jake,

    It sounds like you are looking for 'relative paths' here, and it is what is used by the SDK examples by default. If you open an unmodified example project in the SDK and navigate to Options -> Common configuration -> Preprocessor -> User Include Directories you can see how the paths usually look when relatively pointing to something within the SDK folder itself - without concern for where the SDK root might be placed.

    The relative paths looks like this:

    ../../../../../../modules/nrfx/drivers/include

    And is relative to the location of the SES project file. So, this particular example path goes up 6 levels - to the SDK root - before traversing down /modules/nrfx/drivers/include
    If you make sure to only use relative paths in your project, you should be able to share it with a colleague easily, as long as they place the SES project file at the same hierarchal level in the SDK.

    Please let me know if any part of this should still be unclear, or if you have any additional questions to this!

    Best regards,
    Karl

  • Okay I understand thank you!  I was misunderstanding that the path is relative to the project location so in the relative paths the number of levels to move up is the number of levels between the SDK and the project file.

Reply Children
No Data
Related