<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
_Znaj is a mangled name. TO solve this issue, Leo must put declaration
at the beginning of file:<br>
<br>
extern "C" {<br>
<br>
int load_module(void);<br>
int unload_module(void);<br>
char *description(void);<br>
int usecount(void);<br>
char *key(void);<br>
}<br>
<br>
In this case gcc will know that is a C convention must be used.<br>
The rest of the code may be done in C++.<br>
<br>
<br>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:creslin@digium.com">creslin@digium.com</a> wrote:
<blockquote cite="mid20050204164456.GA14833@hoochie.digium.com"
type="cite">
<pre wrap="">On Fri, Feb 04, 2005 at 02:07:53AM +0100, Leo Moll wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Everybody!
I'm writing an extension module for my asterisk but I have a problem
that I can't figure out. The compilation of the project makes no
problem, the .so file is created correctly but the module is not loaded
by the Asterisk.
In the log file I got the following error:
Feb 4 01:36:39 WARNING[13395]:
/usr/lib/asterisk/modules/app_say_pattern.so: undefined symbol: _Znaj
Feb 4 01:36:39 WARNING[13395]: Loading module app_say_pattern.so failed!
</pre>
</blockquote>
<pre wrap=""><!---->
IIRC, C++ uses different symbol style than C. You'll need to do an
extern "C" {
}
guard block on your API interaction functions.
Hrm.. now that I look back on your problem though, that may not be your
problem...
It looks like it can't find something called _Znaj... Are you sure that
you linked in the file that has the _Znaj symbol in it?
Matthew Fredrickson
_______________________________________________
Asterisk-Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Asterisk-Dev@lists.digium.com">Asterisk-Dev@lists.digium.com</a>
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a>
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
All the Best!
Sergey.
=========================
Sergey Kuznetsov
President/CEO
High Intellectual Technologies, Inc.
Web: <a class="moz-txt-link-freetext" href="http://www.hitcalls.com">http://www.hitcalls.com</a>
E-mail: <a class="moz-txt-link-abbreviated" href="mailto:sergey.kuznetsov@highintellect.com">sergey.kuznetsov@highintellect.com</a>
Business phone: (416) 548-9700
Mobile phone: (647) 287-8448</pre>
</body>
</html>