compiler-errors - Erlang编译错误 “No command to run specified!”

标签 compiler-errors erlang rebar

我使用IntelliJ和Rebar构建了Erlang开发环境。

我已经修改了Erlang插件提供的模板代码。

但是它不能编译。

编译日志:

"C: \ Program Files \ erl8.2 \ bin \ rebar" "C: \ Program Files \
No command to run specified!
Usage: rebar [-h] [-c] [-v <verbose>] [-q <quiet>] [-V] [-f]
To see a list of built-in commands, execute rebar -c.
        [-D <defines>] [-j <jobs>] [-C <config>] [-p] [-k]
Type 'rebar help <CMD1> <CMD2>' for help on specific commands.

rebar allows you to abbreviate the command to run:
(commands...)
erlang_app.erl:
-spec(start(StartType :: normal | {takeover, node()} | {failover, node()},
    StartArgs :: term()) ->
  {ok, pid()} |
  {ok, pid(), State :: term()} |
  {error, Reason :: term()}).
start(_StartType, _StartArgs) ->
  case 'erlang_sup:':start_link() of
    {ok, Pid} ->
      io:format("start ok~n"),
      {ok, Pid};
    Error ->
      Error
  end.
erlang_sub.erl
目前,尚无可生成的通用服务器,因此我还注释了函数return的AChild部分和AChlid部分。
%%  AChild = {'AName', {'AModule', start_link, []},
%%    Restart, Shutdown, Type, ['AModule']},

  {ok, {SupFlags, [AChild]}}.
start.bat
werl -pa ./ebin -eval "application:start(erlang)"

最佳答案

显示的日志表明您已运行不带参数的命令钢筋。要编译项目,应使用rebar compile命令。

关于compiler-errors - Erlang编译错误 “No command to run specified!”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41520084/

相关文章:

objective-c - 无法从Objective-C调用抛出的Swift函数

c++ - 在类中的 C++ 中实现枚举时出错

c++ - 编译器怎么会认为这个变量不是常量?

windows - 在 Windows 服务器上设置 RabbitMQ 集群

c# - C#代码可在Visual Studio 2019中使用,但不能在在线编译器中使用

ssl - 使用 erlang 发送 apns

erlang - 卡在 {"init terminating in do_boot",{undef,[{rmbrDb,start,[],[]},

erlang - 如何使用 rebar3 设置牛仔

erlang - 将分析工具与钢筋结合使用

erlang - 在Erlang中,gen_server :start() and gen_server:start_link()?和有什么区别