I'm trying to compile mod_http_bind without changing the code only to learn how to compile under win XP.
The steps I did:
- install erl5.6
- copy ejabberd_http.hrl, jlib.hrl, ejabberd.hrl, gen_mod.beam, mod_http_bind.erl to C:\Program Files\erl5.6.
- run erlang and type: "c(mod_http_bind)." and get "{ok,mod_http_bind}"
- replace the new mod_http_bind.beam file with the existing file on ejabberd-2.0.0\lib\ejabberd-2.0.0\ebin
run ejabberd and on ejabberd.log I get:
=ERROR REPORT==== 2008-04-28 00:28:29 ===
beam/beam_load.c(1602): Error loading function mod_http_bind:process/2: op allocate u u:
invalid extended tag 4
=ERROR REPORT==== 2008-04-28 00:28:29 ===
Loading of c:/Program Files/ejabberd-2.0.0/bin/../lib/ejabberd-2.0.0/ebin/mod_http_bind.beam failed: badfile
=ERROR REPORT==== 2008-04-28 00:28:29 ===
E(<0.36.0>:gen_mod:66) : {undef,[{mod_http_bind,start,["example.com",[]]},
{gen_mod,start_module,3},
{lists,foreach,2},
{ejabberd_app,start,2},
{application_master,start_it_old,4}]}
Can you please tell me what am I doing wrong?
should compile it with the
should compile it with the erlang that was installed with ejabberd and not with version erl5.6
Right: you must compile the
Right: you must compile the files with an Erlang/OTP version similar to the one used for running ejabberd.
For instance, the ejabberd 2.0.0 binary installers include Erlang/OTP R11B-5.