to auto-load you also need modules.conf.xml modules.conf is only for building.<div><br></div><div>The module can't load because it's missing the symbol:</div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">ZN10CAWETalker9ConfigureEPKc</span></div><div><font color="#222222" face="arial, sans-serif"><br>
</font></div><div><font color="#222222" face="arial, sans-serif">So you need to link in any external libs you might be using into your .so</font></div><div><font color="#222222" face="arial, sans-serif"><br></font><br><div class="gmail_quote">
On Fri, Sep 28, 2012 at 12:05 AM, Jon Lederman <span dir="ltr"><<a href="mailto:jon2718@gmail.com" target="_blank">jon2718@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
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:<br>
<br>
BASE=../../../..<br>
LOCAL_LIBADD+=./lib/aw.so<br>
include $(BASE)/build/modmake.rules<br>
<br>
I am able to build the module and also modified modules.conf to include the new module.<br>
<br>
When I start freeswitch, I don't see a message that the module was loaded.<br>
<br>
When I type: reload mod_aw I receive the following error:<br>
<br>
2012-09-28 04:49:52.738493 [CRIT] switch_loadable_module.c:1310 Error Loading module /usr/local/freeswitch/mod/mod_aw.so<br>
**/usr/local/freeswitch/mod/mod_aw.so: undefined symbol: _ZN10CAWETalker9ConfigureEPKc**<br>
<br>
-ERR unloading module [No such module!]<br>
+OK Reloading XML<br>
-ERR loading module [module load file routine returned an error]<br>
<br>
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.<br>
<br>
Any help on how to configure this would be greatly appreciated.<br>
<br>
Thank you in advance.<br>
<br>
-Jon<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>