Closed sasagawa888 closed 1 year ago
I took a quick look at this. The root cause is the "-I" options in the "cc" command line, in functions compile-file1 and compile-file1* in library/compiler.lsp.
At the moment, unless it has already been set, $EASY_ISLISP is set to share/eisl in the PREFIX. So the -I option will be -I/usr/local/share/eisl (for instance). This will fail to find files in $HOME/eisl/example. One workaround is to set EASY_ISLISP in your environment to $HOME/eisl before starting "eisl -c" (it will override the default), I checked and this works.
It may be a good idea to add "-I." (i.e. the current directory) to the "-I$EASY_ISLISP " options in compiler.lsp.
Thank you for your quick comment.
Before reading the comments, I thought about it myself and tried to improve it. Changed compiler's (finalize fname ".c") to (finalize (remove-dir fname) ".c"). remove-dir removes the directory part.
It looks like it worked. Is this the correct solution?
Yes, that's even better than what I was thinking of. From the "Notes" section of https://en.cppreference.com/w/cpp/preprocessor/include ,
"The intent of syntax (2) is to search for the files that are not controlled by the implementation. Typical implementations first search the directory where the current file resides then falls back to (1)."
So it should look for files in #include ""
relative to the including file, which is what is required.
Thank you very much.
It seems to be a side effect of changing the library's folder. Please help me.