<p dir="ltr">You can do that - and that would give access to any exported functions defined by the header file.<br>
But not to macros or record definitions, as they are not present in the compiled module. </p>
<div class="gmail_quote">Den 29/05/2013 04.06 skrev "苏晔俊" <<a href="mailto:goofan.su@gmail.com">goofan.su@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">According to <a href="http://www.erlang.org/doc/man/shell.html" target="_blank">http://www.erlang.org/doc/man/shell.html</a>:<div><br></div><i><font color="#666666">If a command (local function call) is not recognized by the shell, an attempt is first made to find the function in the module user_default, where customized local commands can be placed. If found, then the function is evaluated. Otherwise, an attempt is made to evaluate the function in the module shell_default. The module user_default must be explicitly loaded.</font></i><br>
<div><i><font color="#666666"><br></font></i></div><div><font color="#000000">So you can place a "user_default.erl" file in your project, and place "</font><span style="font-family:arial,sans-serif;font-size:14px">-include_lib("../.hrl").</span><font color="#000000">" in the file.</font></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/29 Erik Søe Sørensen <span dir="ltr"><<a href="mailto:eriksoe@gmail.com" target="_blank">eriksoe@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">Include for what purpose, exactly?<br>
Record definitions can be read into the shell using (I think) the "rr" command - cf. the command list provided by "help().".<br>
If it is macros you wish to use, however, I don't think the shell supports that.<br>
(Include files may contain other definitions than these two kinds, of course, but it would surprise me a bit if it's something else you need...)</p>
<div class="gmail_quote">Den 29/05/2013 00.34 skrev "Andrew Pennebaker" <<a href="mailto:andrew.pennebaker@gmail.com" target="_blank">andrew.pennebaker@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>
<div dir="ltr">In a compiled Erlang program, we use -include_lib("../.hrl"). How can we include libraries in an active erl interpreter session?<br clear="all"><div><br></div>-- <br><div></div>Cheers,<div><br></div>
<div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div>
</div>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div>