How is the directory of the predefined include libraries determined?
The directory of the predefined include libraries is hardcoded in the interpreter. This information is determined when the Seed7 interpreter is compiled. The command ‘make depend’ writes a line, which defines the C preprocessor variable SEED7_LIBRARY, to the file “seed7/src/version.h”. E.g.: The file “version.h” contains the line: #define SEED7_LIBRARY “/home/abc/seed7_5/lib” The preprocessor macro SEED7_LIBRARY is used by the function init_lib_path() which is defined in “seed7/src/infile.c”. The statements handling the predefined include library directory start after the line #ifdef SEED7_LIBRARY The C string from SEED7_LIBRARY is converted to a Seed7 string with cstri_to_stri(). The function stri_to_path() converts the string to the standard path representation of Seed7. Finally the path is appended to the library search list (lib_path) with: append_to_lib_path(path, err_info) Interpreter and compiler use the same strategy to determine the directory with predefined include libraries.