[Freeswitch-dev] Linking C++ .so Into Custom Freeswitch Module
jon2718 at gmail.com
Fri Sep 28 09:05:33 MSD 2012
I am writing a custom module called mod_aw for freeswitch that uses a dynamic library called aw.so containing a c++ class. I edited the makefile for my module to:
I am able to build the module and also modified modules.conf to include the new module.
When I start freeswitch, I don't see a message that the module was loaded.
When I type: reload mod_aw I receive the following error:
2012-09-28 04:49:52.738493 [CRIT] switch_loadable_module.c:1310 Error Loading module /usr/local/freeswitch/mod/mod_aw.so
**/usr/local/freeswitch/mod/mod_aw.so: undefined symbol: _ZN10CAWETalker9ConfigureEPKc**
-ERR unloading module [No such module!]
+OK Reloading XML
-ERR loading module [module load file routine returned an error]
I know the library works as I have tried it in another program outside of freeswitch. I am not sure what I am doing wrong. I am wondering whether I need to provide extern "C" linkage for the c++ library. However, I only have the .h file and .so file for the library. Or, do I need to add something to my Makefile.
Any help on how to configure this would be greatly appreciated.
Thank you in advance.
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev