1
votes

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

1 Answers

2
votes

Try writing the path as a list of directories, as in {i, [".../here/", ".../there/"]}, even if it's just a single directory.