Arduino command line "fatal error: Scanner_uC.h: No such file or directory"

I am trying to use command line as described in Arduino/manpage.adoc at master · arduino/Arduino · GitHub

$  arduino --upload keybrd_3a_multi-layerHold.ino
Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Initializing packages...
Preparing boards...
Verifying and uploading...
In file included from keybrd_3a_multi-layerHold.ino:4:0:
instantiations_scanners1.h:1:24: fatal error: Scanner_uC.h: No such file or directory
 #include <Scanner_uC.h>
                        ^
compilation terminated.
Error compiling.

Scanner_uC.h is in a sketchbook library.
It compiles from the Arduino IDE.
Why can the command line not find Scanner_uC.h?

I am using Teensy LC and Linux.

Thank you.

Do you have the default "sketchbook.path" set correctly? You can check the default value with:

arduino --get_pref sketchbook.path

It needs that path to find the 'libraries' directory.

Hi johnwasser, thanks for taking a look.

From the terminal: arduino --get_pref sketchbook.path gets popup error message "unknown option: --get_pref".

From Arduino IDE > File > Preferences > Sketchbook location: /home/wolfv/Documents/Arduino

Scanner_uC.h is located in: /home/wolfv/Documents/Arduino/keybrd_proj/keybrd/src/Scanner_uC.h Which is symlinked from /home/wolfv/Documents/Arduino/libraries The sym link is good because Scanner_uC.h compiles on Arduino IDE. This is on Linux.

It should be --get-pref

The default “sketchbook.path” set correctly:

$ arduino --get-pref sketchbook.path
Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Initializing packages...
Preparing boards...
/home/wolfv/Documents/Arduino

The IDE must be adding some magic to put the home/wolfv/Documents/Arduino/keybrd_proj/keybrd/src/ directory in the include file search path.

johnwasser: The IDE must be adding some magic to put the home/wolfv/Documents/Arduino/keybrd_proj/keybrd/src/ directory in the include file search path.

Not sure what you mean. The only magic is that /home/wolfv/Documents/Arduino/keybrd_proj/keybrd/src/Scanner_uC.h is symlinked from /home/wolfv/Documents/Arduino/libraries.