code:priv_dir()

Bengt Kleberg <>
Thu Dec 6 11:09:43 CET 2001


> From: Ulf Wiger <>
 
> There is no logical way to add a name to the code_names table
> except calling code:add_path(Name ++ "/ebin"). This is where the
> compiled code should reside. There is no code:add_name/1
> function (I'm not necessarily saying that there should be.)

Thank you Ulf. Problem 'solved'.

My original code called made 2 attempts to setup the path for 
code:get_priv(Name).

First I added Directory to the path. Directory had Name directly under
it (Directory/Name). That was how I interpreted the manual page. It did
not work.

Then I added Directory1 to the path. (Directory1 = Directory/Name/bin).
That did not work.

The 3:rd attempt (that I just tried) added Directory2 = Directory/Name/ebin to 
path. That worked.
 
 
I would like to express my sentiment that setting up things to make get_priv() 
work is rather un-intuitive.


bengt




More information about the erlang-questions mailing list