Answer the question
In order to leave comments, you need to log in
How to import modules from different directories?
There is a module located in the /foo/faa directory. How can I import a module located in the /foo/fii directory into it?
Answer the question
In order to leave comments, you need to log in
When starting erl, write the path to .beam files.
Example: erl -pa some/path.
You don't need to do anything in the source code. Just use the module name as it is.
It is not clear what is meant by module import. If these modules are within the same assembly, then they will end up in / ebin (after compilation) in the same structure.
Those. if there are src/a/a.erl and src/b/b.erl , then you don't need to import anything to use b.erl module functions in a.erl, just use b:func(...
after the project is built (for example rebar) both files will end up in /ebin/{a,b}.beam
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question