我如何从erl shell编译一个带有includes的Erlang文件?

igsr9ssn  于 2022-12-08  发布在  Erlang
关注(0)|答案(1)|浏览(137)

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?

js5cn81o

js5cn81o1#

尝试将路径写为目录列表,如{i, [".../here/", ".../there/"]},即使它只是一个目录。

相关问题