escript -- undefined function main/1 if using relative path

Radu Brumariu brum76@REDACTED
Tue Feb 1 21:23:00 CET 2011


Hi,
I have this escript archive and if I execute it from a relative path I
get the following error :


ebin/myscript -p .
escript: exception error: undefined function myscript:main/1
  in function  escript:run/2
  in call from escript:start/1
  in call from init:start_it/1
  in call from init:start_em/1


by if I cd in its directory of if I supply the full path to the script it works.

Any suggestions what I might be doing wrong ?

Thanks,
Radu


More information about the erlang-questions mailing list