初学者安装模块最简单的方法是什么?

7st*_*tud 6 erlang

我检查了一下rebar,但这似乎太复杂了.也许有人可以%Post your code here在以下钢筋应用程序中发布一些内容:

%%%-------------------------------------------------------------------
%% @doc myapp public API
%% @end
%%%-------------------------------------------------------------------

-module('myapp_app').

-behaviour(application).

%% Application callbacks
-export([start/2
        ,stop/1]).

%%====================================================================
%% API
%%====================================================================

start(_StartType, _StartArgs) ->
    'myapp_sup':start_link().

%%--------------------------------------------------------------------
stop(_State) ->
    ok.
Run Code Online (Sandbox Code Playgroud)

是否有一些更容易的替代初学者?

Nat*_*rot 5

如果要创建任何非平凡的东西,就无法逃脱学习语言构建系统的麻烦。如果您熟悉GNU Make,则可以使用erlang.mk代替Rebar,但是我相信Rebar3是最适合初学者的。


要解决在REPL中运行某人的库代码的特定问题,请尝试使用rebar3进行以下操作:

rebar3新应用

忽略它现在创建的源文件。编辑rebar.config添加依赖项。然后,启动加载了那些依赖项的REPL(以及您在src/目录中创建的任何源文件):

rebar3外壳