[erlang-questions] "dynamic" include?

Thomas Lindgren <>
Fri Oct 26 11:21:34 CEST 2007


--- YC <> wrote:

> Hi Roberto -
> 
> On 10/25/07, Roberto Saccon <>
> wrote:
> 
> > > You could also programmatically set your include
> directories in the
> > > Makefile or use an Escript to compile, then you
> don't have to hardcode
> > > those paths in your src files.
> 
> 
> Are you talking about passing code_path into erl
> when writing Makefile?
> It's not clear how that would enable the hrl to be
> dynamically set.  Do you
> have any examples?

What would a "dynamically set" include path mean to
the compiler?

Anyway, the erlang compiler just uses the provided
include paths, much like a C compiler. To modify the
include path I tend to use things like:

   erlc -I$(INC) mymod.erl

or

   compile:file("mymod.erl", [{i, "..."}])

Best,
Thomas


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the erlang-questions mailing list