[erlang-questions] Remote module compilation

Alin Popa <>
Tue May 26 13:13:33 CEST 2009


I forgot to say that the file is not present on 2nd node...so, maybe I could
not use code:load_binary.....

On Tue, May 26, 2009 at 1:59 PM, Alin Popa <> wrote:

> Hi,
>
> It is possible to send remote a module source and that one to be compiled
> there ?
> Or, I have a compiled module but is not loaded on the remote process; is it
> possible to send it there, or I should express load it on the remote
> process?
> This is my test module:
>
> *-module(test).
> -export([test_fun/0]).
>
> test_fun() ->
>    io:format("Hello ~p~n",["World"]).*
>
>
> now, start one erlang process(on 1st machine):
>
> *erl -name  -setcookie test123*
>
> ... start other erlang process (on 2nd machine):
> *erl -name  -setcookie test123*
>
> In 1st node:
>
> *1> c(test).
> {ok, test}
> 2>
> *
> In 2nd node, do nothing...
>
> In the 1st node:
>
> *2> spawn('', test, test_fun, []).*
>
> *Error in process <0.49.0> on node '' with exit value:
> {undef,[{test,test_fun,[]}]}*
>
> (Which is normal, I think)
>
>
> So, somewhere in this *flow, *something like *remote module loading* can
> be done ?
>
> Thanks.
>
> --
> Regards,
>
> Alin
>
>


-- 
Best Regards,

Alin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090526/8b74641a/attachment.html>


More information about the erlang-questions mailing list