linking modules from other directories

kamiseq kamiseq@REDACTED
Mon Oct 12 12:28:30 CEST 2009

is there a way to direct erlang that specified module is in another
directory so it can use it when compiling.

let say my project is like

               /efoo.erl (where module is defined as -module(foo.efoo) )
               /ebaz.erl (where module is defined as -module(baz.ebaz) )

so now, how to reference util.erl from main.erl.
I havent tried that but it seems that I may reference efoo and ebaz from
main.erl using package notation (ie foo.efoo:countTo5() ), but there is no
way to reference other.erl from efoo.erl or ebaz.erl.

OR should I just include file (like with header files) and then use it
normally? util:fun()??? but it will include the other file in my module and
all I want is point compiler where the module is.

the other thing is that compiler can't catch calls to missing modules (in
other dirs) it will throw {'module could not be loaded' only in

is there something like class path for erlang??

Paweł Kamiński


More information about the erlang-questions mailing list