Some search paths or parts of them are determined by configure variables
(in italics, see section above). Further search paths are determined
by environment variables during runtime.
The paths searched when running the compiler are as follows (the first
catch wins):
1. Binary files (preprocessor, assembler and linker)
Search path | default | Win32 builds |
$SDCC_HOME/$PPREFIX2BIN_DIR | $SDCC_HOME/bin | $SDCC_HOME\bin |
Path of argv[0] (if available) | Path of argv[0] | Path of argv[0] |
$PATH | $PATH | $PATH |
2. Include files
Search path | default | Win32 builds |
--I dir | --I dir | --I dir |
$SDCC_INCLUDE | $SDCC_INCLUDE | $SDCC_INCLUDE |
$SDCC_HOME/
$PREFIX2DATA_DIR/ $INCLUDE_DIR_SUFFIX |
$SDCC_ HOME/
share/sdcc/ include |
$SDCC_HOME\include |
path(argv[0])/
$BIN2DATADIR/ $INCLUDE_DIR_SUFFIX |
path(argv[0])/
../sdcc/include |
path(argv[0])\..\include |
$DATADIR/
$INCLUDE_DIR_SUFFIX |
/usr/local/share/sdcc/
include |
(not on Win32) |
The option --nostdinc disables the last two search paths.
3. Library files
With the exception of ''--L dir'' the model is auto-appended
by the compiler (e.g. small, large, z80, ds390 etc.).
Search path | default | Win32 builds |
--L dir | --L dir | --L dir |
$SDCC_LIB/
<model> |
$SDCC_LIB/
<model> |
$SDCC_LIB\
<model> |
$SDCC_HOME/
$PREFIX2DATA_DIR/ $LIB_DIR_SUFFIX/<model> |
$SDCC_HOME/
share/sdcc/ lib/<model> |
$SDCC_HOME\lib\
<model> |
path(argv[0])/
$BIN2DATADIR/ $LIB_DIR_SUFFIX/<model> |
path(argv[0])/
../sdcc/lib/<model> |
path(argv[0])\
..\lib\<model> |
$DATADIR/
$LIB_DIR_SUFFIX/<model> |
/usr/local/share/sdcc/
lib/<model> |
(not on Win32) |
The option --nostdlib disables the last two search paths.