Re: Phix - Cannot open autoinclude VM/pLen.e
- Posted by ghaberek (admin) Jul 24, 2017
- 1819 views
I think I've found the main culprit - command_line() on Linux was not yielding full paths like it does on Windows.
I've pushed a new builtins/VM/pcmdlnN.e; line 316, after
Excellent. That worked perfectly. I now have a working Phix install on Linux.
That all looks good, but....
That change above is probably equivalent to the fourth one, and I'm pretty sure the third is already covered.
While -I might be a handy programmer shortcut, it has implications for code sharing and customer installations - if you don't know what to put after the -I you'll never get the code to run, ditto eu.cfg.
The executable 'p' and the directory 'builtins' really ought to be in the same place (and it was just a stupid bug that the compiler didn't know how to figure that one out), and "stub includes" just feel better to me, for instance builtins\pGUI.e is just "include ../demo/pGUI/pGUI.e", which is obviously per-machine, and per-project is very similar - all virtually equivalent to eu.cfg files anyway.
I won't dig me heels in against doin it your way, but I'm not keen.
For larger projects, I tend to organize files into separate src and include directories, and having eu.cfg really helps. Maybe just that one project has certain include files that I don't need or want available globally.
IMHO, I don't think it's a good idea to ever hard-code a path like this. Either it searches relative to its own paths, or the user specifies the path manually, or both.
-Greg