Note that there are some explanatory texts on larger screens.

plurals
  1. POErlang: add libraries to application
    primarykey
    data
    text
    <p>I use <strong>erlIDE</strong> (based on Eclipse) to work on Erlang projects. Till today everything was fine, but today I have to use external library (couchbeam) in my application. I found out, what is hell, btw.)</p> <p>The problem is simple – I cannot include external library to compiler path. I've used rebar to get couchbeam's dependencies and it also downloaded ibrowse, mochiweb and ejson.</p> <p><strong>How can I include those libraries to compiler path without modifing ERL_LIBS to work on project in erlIDE?</strong> </p> <p>I do not want modify ERL_LIBS, because I can change projects's path, start new one (then I should modify ERL_LIBS again) and so on.</p> <p>I've tried compiler options in erlIDE:</p> <pre><code>{pa, {pa, 'site_stater/deps/couchbeam/'}} </code></pre> <p>or</p> <pre><code>{pa, {pa, '../deps/couchbeam/'}} </code></pre> <p>where 'site_stater' – is project's name</p> <p><em>I wonder how professional erlang programmers organaze their projects workflow (where they write erlang progs, how debuggin it, deal with external libraries and so on).</em></p> <p>Many thanks for your attension.</p> <p><strong>UPDATE</strong> I wrote simple function to load libraries, but I think it is still wrong way to deal with this problem:</p> <pre><code>load_libraries() -&gt; ProjectRoot = filename:join([filename:absname("./"), "site_stater"]), {ok, DepsList} = file:list_dir(ProjectRoot ++ "/deps/"), lists:foreach(fun (Folder) -&gt; RealFolder = ProjectRoot ++ "/deps/" ++ Folder, case filelib:is_dir(RealFolder) of true -&gt; code:add_patha(filename:join([RealFolder, "/ebin"])); false -&gt; ok end end, DepsList), ok. </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload