So, I'd like to use C++ for developing freediameter extension, The shared library is compiled and linked successfully, however when it is gonna be used by freediameter daemon, i receive this error:
01/16/17,00:04:59.215241 ERROR Unable to resolve symbol 'fd_ext_init' for extension /home/usr/Downloads/freeDiameter-master/extensions/ocs_app/ocs_app.fdx: Undefined symbol "fd_ext_init"
01/16/17,00:04:59.215361 ERROR ERROR: in '((fd_ext_load()))' : Invalid argument
01/16/17,00:04:59.215377 ERROR ERROR: in '(fd_core_parseconf(conffile))' : Invalid argument
01/16/17,00:04:59.215387 FATAL! Initiating freeDiameter shutdown sequence (1)
I guess it has something with name mangling, but i cannot seems to find the solution. already tried to put the entry point into extern block but no luck:
extern "C" {
static int ta_entry() {
// C/C++ codes here ..
}
}
also when i check "fd_ext_init" definition in the shared libary via nm, it'd be like:
0000000000008140 T _Z11fd_ext_initiiPc