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

proj
     /lib/
     /inc
          /header.hrl
     /src
          /foo
               /efoo.erl (where module is defined as -module(foo.efoo) )
          /baz
               /ebaz.erl (where module is defined as -module(baz.ebaz) )
          /main.erl
          /other.erl
util
     /util.erl

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
runtime..........

is there something like class path for erlang??
-- 

pozdrawiam
Paweł Kamiński

kamiseq@REDACTED
pkaminski.prv@REDACTED
______________________


More information about the erlang-questions mailing list