[erlang-questions] Recommendations re beam files

Adhiyaman adhiyaman@REDACTED
Sat Mar 16 13:37:00 CET 2019


Hi,

/code:add_path(DIRECTORY)/, adds the directory to the list of 
directories where ERTS would look for a beam file.

     To view the list of directories which are currently in this list, 
you can use :

/    code:get_path()./

//In addition to this, the following caution is needed :
//

/        If there are multiple beams having the same name. The beam in 
the directory which occurs first in the list is loaded for execution by 
the ERTS./

/        There are additional calls in the code module./

/        Which would aid in the addition of the directory towards the 
beginning of the list
/

/        code:add_patha(DIRECTORY).
/

/        For including the directory in the end of the list use 
code:add_pathz(DIRECTORY)./

Hope this helps you Donald, Cheers ! ..

-Adhi
//


On 16-03-2019 05:52 PM, Donald Steven wrote:
>
> Thanks Adhi.  Can you please tell me how to do this; I don't 
> understand what you mean by "... using code module".  Thx.
>
> On 3/16/2019 7:35 AM, Adhiyaman wrote:
>>
>> Hi,
>>
>>     You can set the code path using code module. This tell the ERTS 
>> where to locate your beams in case you've moved them from the default 
>> lib directory.
>>
>> -Adhi
>>
>> On 16-03-2019 04:44 PM, Eric Pailleau wrote:
>>>
>>> Hi,
>>>
>>> Move them to a project for all common things, and add a dependancy 
>>> to it in all your projects.
>>>
>>> This way you can specify which version you need.
>>>
>>>
>>>
>>> Envoyé depuis mon mobile
>>>
>>>
>>>
>>> ---- Donald Steven a écrit ----
>>>
>>> To this point (I'm new at this) I've been keeping beam files for the
>>> modules I need in the same directory as the main module. This makes
>>> sense for those modules that are closely allied to the main module and
>>> unlikely to be used or modified for other programs. However, I have a
>>> core set of modules that are used by all my programs. I'd like to keep
>>> these together and in *one* place so that they're easier to maintain.
>>> Also, I don't want to have multiple copies floating around.
>>>
>>>
>>> How do I specify to the compiler where to find them? (I use Linux.)
>>>
>>>
>>> Thanks.
>>>
>>>
>>> Don
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190316/e50ff587/attachment.htm>


More information about the erlang-questions mailing list