繁体   English   中英

为什么 rebar 不编译我的文件?

[英]Why doesn't rebar compile my files?

自从我完成任何 Erlang 以来已经有一段时间了,我想回到它并使用rebar来完成它。 我有一个简单的模块测试组合,我已经验证编译正常,但是当我尝试通过 rebar 编译它时,没有任何反应:

PS C:\Users\Magnus\Programming\binlog_parser_demo> rebar co -vv
DEBUG: Consult config file "c:/Users/Magnus/Programming/binlog_parser_demo/rebar.config"
DEBUG: Rebar location: "c:/Users/Magnus/Programming/rebar/rebar"
DEBUG: is_rel_dir(C:/Users/Magnus/Programming/binlog_parser_demo) -> false
DEBUG: Available deps: []
DEBUG: Missing deps  : []
DEBUG: Plugins requested while processing C:/Users/Magnus/Programming/binlog_parser_demo: []
DEBUG: Predirs: []
==> binlog_parser_demo (compile)
DEBUG: Matched required ERTS version: 7.0 -> .*
DEBUG: Matched required OTP release: 18 -> .*
DEBUG: Min OTP version unconfigured
DEBUG: Postdirs: []
PS C:\Users\Magnus\Programming\binlog_parser_demo> ls -r

    Directory: C:\Users\Magnus\Programming\binlog_parser_demo

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----               3/9     15:42            src
d----               3/9     14:42            test

    Directory: C:\Users\Magnus\Programming\binlog_parser_demo\src

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---               3/9     14:43       2293 binlog_parser_demo.erl

Directory: C:\Users\Magnus\Programming\binlog_parser_demo\test

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---               3/9     14:51       2662 binlog_parser_demo_tests.erl

我究竟做错了什么? 文件结构是我运行模板rebar create template=simplemod modid=binlog_parser_demo (并将生成的文件替换为我预先编写的旧文件)。 我已经验证了erlc在路径中并且可用,并且erlc在独立运行时可以编译文件。

您需要将.app.src文件添加到您的src目录以定义您的应用程序。 内容可能类似于以下内容,但您需要对其进行调整以使其适合您的情况。

{application, binlog_parser, [
    {description, "Binlog Parser"},
    {vsn, "0.1"},
    {registered, []},
    {applications, [kernel, stdlib]}
]}.

有关更多信息,请参阅钢筋“入门”文档

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM