Getting Started: tut.erl : exiting with an error?!?

Bengt Kleberg bengt.kleberg@REDACTED
Fri Jan 14 09:08:14 CET 2005


Charles Hixson wrote:
> Please help.  Something's quite wrong.  Here's the program:
> -module(tut).
> -export([double/1]).
> 
> double(X) ->
>     2 * X.
> 
> And here's the result of running it:
> :~/projects/erlang$ erl
> Erlang (BEAM) emulator version 5.3.6.3 [source] [hipe] [threads:0]
> 
> Eshell V5.3.6.3  (abort with ^G)
> 1> c(tut).
> ** exited: {undef,[{compile,file,[tut,[report_errors,report_warnings]]},
>                    {c,c,2},
>                    {erl_eval,do_apply,5},
>                    {shell,eval_loop,2}]} **

the error comes first: undef
that means that whatever follows was undefined (did not exist).

next comes the list of what was wrong:
first module: compile
then function: file
and finally a list of arguments. arg1: tut
arg2: [report_errors,report_warnings].


ie, the the call
compile:file( tut, [report_errors,report_warnings] )
does not exist.

start by checking, from the erlang shell, if the module compile exists:

1> m(compile).

this will list exported functions (if compile exists) and you can check 
if the function file/2 is exported.


please do that and get back to me.


bengt



More information about the erlang-questions mailing list