[erlang-questions] Can't run my command line Erlang program
Steve Vinoski
vinoski@REDACTED
Thu Nov 14 04:47:17 CET 2013
On Wed, Nov 13, 2013 at 10:33 PM, Andrew Pennebaker <
andrew.pennebaker@REDACTED> wrote:
> I'm trying to get my command line Erlang program, ios7crypt.erl, to
> compile and run, but I'm getting an error.
>
> Source:
>
> https://github.com/mcandre/ios7crypt/blob/master/erlang/ios7crypt.erl
>
> Trace:
>
> $ make
> erlc -Wall +debug_info ios7crypt.erl
> erl -noshell -s ios7crypt -- -e monkey
> {"init terminating in
> do_boot",{undef,[{ios7crypt,start,[],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>
> Crash dump was written to: erl_crash.dump
> init terminating in do_boot ()
> make: *** [test] Error 1
>
> Am I using the wrong syntax to run ios7crypt, or am I declaring the
> start/1 function incorrectly?
>
Your command line calls start/0, not start/1. If you want the latter, you
need to pass an argument on your command line. Or maybe you could add a
start/0 function. See the doc for -s here:
http://erlang.org/doc/man/erl.html
--steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131113/6a950c68/attachment.htm>
More information about the erlang-questions
mailing list