Hi everybody!
I am new to both Erlang as well as ejabberd module programming, so although I am searching and testing for some hours now, I might just not be asking the correct questions to google - if so: Sorry for that! ;)
The problem I have is that the module I am playing around with is using a call to:
ejabberd_config:get_global_option({access, Rule, global})
Everything compiles well, but I get an error in ejabberd.log, reading:
[...] @ejabberd_hooks:run_fold1:356 {undef,[{ejabberd_config,get_global_option, [...]
I have a similar problem before with the ?INFO_MSG makro, where it turned out that I needed to add the "-DLAGER" flag to my comilation command. However, for this specific case, I could not find a hint yet.
My compilation command reads:
erlc -DLAGER=true -I [...]/ejabberd/include/ -pa [...]/ejabberd/ebin/ myModule.erl
The headers included are:
-include("ejabberd.hrl").
-include("jlib.hrl").
-include("logger.hrl").
Is it possible that the problem is that I am compiling against the headers only instead of against the complete source?
Any hint would be appreciated!
Thanks in advance,
volle
Hello again! I just solved
Hello again!
I just solved things myself.
The problem was that the code I was starting from seems to have used an old API version of ejabberd_config, so not even the argument count and format seemed to be correct...
I don't really understand why it compiled, however...
Anyhow, I got my module up and running.
Cheers,
volle