Hi,
I’m trying to start with developing modules.
After compiling my module, I don’t seem to be able to produce a .beam file... Using the command:
erlc -I /path/to/my/installation/ebin/ mod_test.erl
I get only one warning:
Warning: behaviour gen_mod undefined
And that’s as far as I can get. Any advices please?
This is not the short
This is not the short solution, but if you plan to develop erlang code, this will save you work in the future:
1. Download ejabberd source code, probably from Git repository. This is a good idea, because that way you have at hand the ejabberd source code to read and learn
2. Compile ejabberd (by running "make"). This is good because soon you will want to tweak ejabberd source code too, not only your modules.
3. Copy your custom module to ejabberd src/ dir.
4. Compile again. This time it will compile your module
5. Copy your beam file to where the other ejabberd beam files are installed
hi! I am new using ejabberd.
hi!
I am new using ejabberd. this make sense to me now.
SharonU wrote: Hi, I’m trying
Hi,
I’m trying to start with developing modules.
After compiling my module, I don’t seem to be able to produce a .beam file... Using the command:
erlc -I /path/to/my/installation/ebin/ mod_test.erl
I get only one warning:
Warning: behaviour gen_mod undefined
And that’s as far as I can get. Any advices please?
I get the same thing any help would be good
You need to provide path to
You need to provide path to gen_mod which is in include folder of ejabberd installation..
Just create an Emakefile, add following
{'mod_your_mod_name', [{outdir, "ebin"},{i,"/usr/lib/ejabberd/include"}]}.
and
then run "erl -pa /usr/lib/ejabberd/ebin -pz ebin -make"
best of luck..