简体   繁体   中英

How to compile and use modified ejabberd source files

I have ejabberd server v16.03 running, (written in erlang 18.3 ), which I downloaded from ejabberd site for ubuntu .

I want some custom tasks to be done by server.
So I have modified ejabberd_c2s.erl file.
When I compile it from source using ./configure make make install , it compiles without any errors.

But when I run it using ejabberdctl start it doesn't run the changes I made.
So, I need to use debugger ejabberdctl debug and attach the module ejabberd_c2s.erl only then changes I made works.

Even the logs don't show any changes after debug mode enable or disabled.

I want my changes to be work on production server.

Any suggestions will be appreciated!!!

try this- syntax - erlc -I include_hrl_file_path -o ejabberd_binary_file_path(output path) sourc_file_path

example-
erlc -I /opt/ejabberd-16.03/lib/ejabberd-16.03/include -o /opt/ejabberd-16.03/lib/ejabberd-16.03/ebin  ejabberd_src/ejabberd_c2s.erl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM