[英]Install mod_websocket module in ejabberd 2.1.11 Windows
[英]ejabberd module compilation error
我是ejabberd的新手,试图在Windows服务器上为offline_message_posturl添加新模块。 除了以下内容,我找不到专门针对Windows的博客文章。 我使用的是ejabberd 15.07版。
我一直在关注这篇博文: http : //jasonrowe.com/2011/12/30/ejabberd-offline-messages/
现在我无法从模块文件创建.beam
文件。 我收到此错误:
> c(mod_http_offline).
mod_http_offline.erl:21: undefined macro 'INFO_MSG/2'
mod_http_offline.erl:27: undefined macro 'INFO_MSG/2'
mod_http_offline.erl:44: undefined macro 'INFO_MSG/2'
mod_http_offline.erl:11: function start/2 undefined
mod_http_offline.erl:11: function stop/1 undefined
mod_http_offline.erl:38: function post_offline_message/3 undefined
error
我该如何解决这个错误?
INFO_MSG
宏过去是在头文件ejabberd.hrl
定义的,但是它被移动到ejabberd 13.06中的logger.hrl
,该文件是在撰写博客文章之后发布的。 包括logger.hrl
以及ejabberd.hrl
,您的文件应该编译:
-include("ejabberd.hrl").
-include("logger.hrl").
您没有指向ejabberd include .hrl文件。 最简单的方法可能是将模块添加到ejabberd src目录并重新编译所有内容。
否则,您可以使用-I编译模块,使用-I指向ejabberd include dirs(根据需要使用尽可能多的-I指令)。 例如:
erlc -I ../ejabberd/include mod_http_offline.erl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.