[erlang-questions] macro in include definition - can't

Ahmed Omar <>
Wed May 11 00:33:31 CEST 2011

I'm not sure i understand what u r trying to do exactly. but are u trying to
-define(FILE, "somepath").
in some.hrl?
cause ?FILE is a predefined macro that is expanded to the name of the
current module, you can't redefine it.

On Tue, May 10, 2011 at 11:36 PM, Wes James <> wrote:

> I was trying to do something like this:
> -include("some.hrl").
> -include(?FILE).
> Where FILE is defined in some.hrl, but found that can't be done.   I
> was trying to define a path to a hrl file without having it show in
> the actual file on github.  I guess the way to do this is with an
> environment variable, if I'm worried about it.
> I found info on macros in "The Preprocessor" page on erlang.org
> http://www.erlang.org/doc/reference_manual/macros.html
> -wes
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions

Best Regards,
- Ahmed Omar
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110511/bbcc368a/attachment.html>

More information about the erlang-questions mailing list