0
votes

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!

1

1 Answers

2
votes

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.