simple question

Luke Gorrie luke@REDACTED
Sat May 12 21:47:38 CEST 2001


"Jonas Dageförde" <jdagefoerde@REDACTED> writes:

> Dear Sir or Madam, I'm trying to start "erl" or "werl" under Windows
> 98 with the argument "-pa <directory>" and/or "-pz <directory>". I can
> see the key/value pair in the argument list returned by
> "init:get_arguments()". But if I try to load a module with
> "c(mymodule)", erlang doesn't find it, if it is in the "own_files"
> directory. What can I do so that I don't have to put all my source and
> header files in the "C:\Programme\erl5.0.2" directory?

c(mymodule) actually compiles (and loads) the mymodule.erl file down
to mymodule.beam. It does this in the current directory, so you'll
want to do:

  cd("c:/directory/with/my/module/").

Before doing c(mymodule)

Using "-pa" makes erlang automatically load the module (from the .beam
file) from that directory when its needed, if its already compiled. So
you can use it for pointing erlang at the code that you've already
c()'d.

Cheers,
Madam Luke



More information about the erlang-questions mailing list