akonsu
akonsu

Reputation: 29538

how to set include directory for rebar

In my module I have

-include("blah.hrl").

The .hrl file is not in the module's directory, but somewhere else on my system. How can I make rebar find it when compiling? Is there a way to add a path to the include directory in rebar.config?

Upvotes: 8

Views: 3054

Answers (1)

demeshchuk
demeshchuk

Reputation: 742

{erl_opts, [{i, PathToIncludeFile}]}.

in rebar.config should do the thing. Or append {i, ...} to the existing erl_opts, if you have any.

Upvotes: 7

Related Questions