Skip to content

File and folder symlink to trick the include directive in Arduino sketches

Notifications You must be signed in to change notification settings

LEGIONBOSS/Arduino-symlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symbolic link example

Goal: Trick the #include directive to see a symbolic link to a .h header file or a folder that is not next to the main .ino file.

MS Documentation

Link to file

CMD

@ECHO OFF

cd ..\examples\symlink_file
mklink import.h ..\..\lib\import.h

PAUSE

Output

Arduino-symlink-test\examples\symlink_file>mklink import.h ..\..\lib\import.h
symbolic link created for import.h <<===>> ..\..\lib\import.h

Link to folder

CMD

@ECHO OFF

cd ..\examples\symlink_folder
mklink lib /d ..\..\lib

PAUSE

Output

Arduino-symlink-test\examples\symlink_folder>mklink lib /d ..\..\lib
symbolic link created for lib <<===>> ..\..\lib

About

File and folder symlink to trick the include directive in Arduino sketches

Resources

Stars

Watchers

Forks