[erlang-questions] clueless newbie can't compile

John Chandler morph@REDACTED
Mon Jun 16 02:46:34 CEST 2008


I can't interpret the error message, either.

Two different tutorials advise creating a file and compiling it,  
which seems
like a reasonable way to start.  To take one, it advises me to create a
file, "tut.erl", containing the following:
====
-module(tut).
-export([double/1]).

double(X) ->
     2 * X.
====

And then, within erl, to type "c(tut).".  Which also seems fine.  What
happens is:

====
1> c(tut).
** exited: {undef,[{compile,file,[tut,[report_errors,report_warnings]]},
                    {c,c,2},
                    {erl_eval,do_apply,5},
                    {shell,exprs,6},
                    {shell,eval_loop,3}]} **

=ERROR REPORT==== 15-Jun-2008::20:07:51 ===
Error in process <0.29.0> with exit value: {undef,[{compile,file,[tut, 
[report_errors,report_warnings]]},{c,c,2},{erl_eval,do_apply,5}, 
{shell,exprs,6},{shell,eval_loop,3}]}

2>
====

OK, so what am I being told here?  Something is undefined, but it's  
not clear
to me what that thing is, or where it's supposed to be, much less  
what I can
do about it.  Can someone toss me a clue?

I'm using the CEAN package, and while I believe I followed the  
instructions
in the FAQ, I could have made a mistake somewhere.

I launched erl from the directory where tut.erl sits.  I had, per the  
FAQ, set
the BASEDIR to /usr/local/cean, so I thought maybe for some unpleasant
reason the file had to reside there, and copied it over, but the same  
symptom
resulted.

Thanks.

-jmc




More information about the erlang-questions mailing list