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

Ahmed Omar spawn.think@REDACTED
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
do
-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 <comptekki@REDACTED> 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
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 
Best Regards,
- Ahmed Omar
http://nl.linkedin.com/in/adiaa
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.htm>


More information about the erlang-questions mailing list