简体   繁体   中英

Erlang deps loading

I'm trying to write erlang first app. It has https://github.com/emedia-project/erlffmpeg in deps, I have almost the same Makefile.

When I run erlang shell in erlffmpeg dir and eval README example, all ok. But When I do it from my project's dir, I get error like: ucp detect undef . So, my erl shell see the fns from ffmpeg module, but when i try to eval this fns it seems like shell doesn't know about inheritant deps of ffmpeg.

I run erl shell with make dev command. In short, it does erl -pa ebin deps/*/ebin

Seems like i'm missing some knowledge about module loading. What should I do with this and what you advice me to read?

Thank you!

So, the answer is to use rebar and set the deps like:

{deps, [
   {ffmpeg, ".*", {git, "https://github.com/emedia-project/erlffmpeg", "master"}}
]}.

In this case rebar will automatically download all iner dependencies in root deps folder, so the shell with command erl -pa ebin deps/*/ebin will hook up all .beam files.

Big thanks to friendly #erlang members.

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