问题描述
我签出了钢筋
,但这似乎太复杂了。也许有人可以在以下钢筋应用程序中发布如下内容:%在此处发布您的代码
:
I checked out rebar
, but that seems way too complex. Maybe someone could post something that says, %Post your code here
in the following rebar app:
%%%-------------------------------------------------------------------
%% @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.
对于初学者,有没有更简单的选择?
Is there some easier alternative for beginners?
推荐答案
如果您要创建任何非平凡的东西,就无法逃避学习语言构建系统的麻烦。如果您熟悉GNU Make,则可以使用代替Rebar,但是我相信Rebar3是最入门的-
You cannot escape having to learn your language's build system if you're going to create anything non-trivial. If you are familiar with GNU Make you can use erlang.mk instead of Rebar, but I believe Rebar3 is the most beginner-friendly.
要解决在REPL中运行某人的库代码的特定问题,请尝试使用rebar3进行以下操作: / p>
To solve the specific problem of running someone's library code inside of the REPL, try the following with rebar3:
忽略源它现在创建的文件。编辑 rebar.config
并。然后,启动一个加载了那些依赖关系的REPL(以及您在 src /
目录中创建的任何源文件):
Ignore the source files that it creates for now. Edit rebar.config
and add dependencies. Then, launch a REPL that has those dependencies loaded (along with any source files you've created in the src/
directory):
这篇关于初学者安装模块最简单的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!