erlc -I <abspath-to-include-dir> <module>.erl
on the command line correctly compiles <module>
But in the Erlang shell ( erl
), the following produces errors with "cannot find include file":c(<module>, [{i, <abspath-to-include-dir>}]).
Why? Shouldn't the behavior of these two ways of compiling files be the same?
1条答案
按热度按时间js5cn81o1#
尝试将路径写为目录列表,如
{i, [".../here/", ".../there/"]}
,即使它只是一个目录。