1
我正在試圖製作簡單的ejabberd
鉤子或模塊。爲此,我使用eclipse
執行這些步驟。如何在Eclipse中編譯ejabberd鉤子
創建二郎項目,我給
reference
到ejabberd
源代碼,這是我從下載github
。現在我寫的代碼
%% @author anuj %% @doc @todo Add description to hello_word. -module(hello_word). -behavior(gen_mod). -export([start/2,stop/1]). start(_Host, _Opt) -> ?INFO_MSG("Loading module 'mod_hello' ", []). stop(_Host) -> ok.
我現在用這個命令
([email protected])2> c(hello_word).
這給了此錯誤消息對我
hello_word.erl:11: undefined macro 'INFO_MSG/2'
hello_word.erl:8: function start/2 undefined
hello_word.erl:6: Warning: behaviour gen_mod undefined
error
編譯
任何人都可以在這個過程中糾正如何可以爲ejabberd做一個簡單的鉤子並編譯它。