简体   繁体   中英

erlang library - export module from another directory than src (rebar3)

In rebar3 erlang library I have two modules: t1 and t1 in src directory and t3 module in extras directory. Now in mylib.app.src I'm trying to make them available outside library by:

{modules, [t1, t2, t3]}

I pointed that extra directory in rebar3.config :

{extra_src_dirs, ["extras"]}.

But still, I cannot use t3 module in project, which uses this library. What else should I do to make this module available outside?

Use {src_dirs, ["extras"]}. . Please refer to rebar3 documentation for more information ( Directories ) section.

Also you do not need to include the modules in mylib.app.src manually. rebar3 automatically adds all the source modules to the mylib.app file during compilation. The .app would be in ebin directory ( _build/default/lib/mylib/ebin/ ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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