Using Windows' symbolic links to manage Arduino Libraries.
The Arduino IDE is a bit poor in managing (files of) bigger projects. What I wanted is to make several applications (i.e. Arduino sketches). But those applications share common code (i.e. Arduino libraries). But I also want to store the applications and the libraries side by side in a git repository.
I learned that Windows Vista (?) and up has symbolic links; shortcuts that are transparent for applications. In this repo, there is
- An application
myapp, whose sketch usesmylib, namelymylib_succ(). - A library
mylib, whose source implementsmylib_succ(). - Those are side by side - but
myappcan not findmylib. - A batch file link.bat that uses
mklinkto create a linkC:\Users\maarten\Documents\Arduino\libraries\mylibto the repo. - Now,
myappdoes compile.
To execute link.bat you need a cmd shell with administrator privileges.
Hit the Windows button, start typing cmd and select Run As Administrator.
(end)
