Unable to cloud compile with symlinked files

With a directory structure like this

 - main.ino
 - sub
   - lib1.h
 - sub2  symlinked
   - lib2.h 

where sub2 is a directory symlink to a directory outside of the project directory. I can include sub/lib1.h fine, but /sub2/lib2.h does not include. The cloud compiler gives

fatal error: sub2/lib2.h: No such file or directory

and sub2/lib2.h does not appear in the list of included files. Presumably the symlinked directory is not being uploaded properly? This compiles fine with the local compiler. If I use the lib directory I get the same problem.

Perhaps I am approaching this wrong and symlinks are not the best idea - when having multiple projects that all need to share some common code, what’s the best way to include one common file in all the projects?

anyone have any idea on this?:slight_smile:

I’ve ended up using a private Particle library for the common code, which does mean that to update the devices I have to do a particle library update before I can flash, but seems to be working well.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.