[Asterisk-Dev] Question about compiling a module for Asterisk with CPP stuff

creslin at digium.com creslin at digium.com
Fri Feb 4 09:44:56 MST 2005


On Fri, Feb 04, 2005 at 02:07:53AM +0100, Leo Moll wrote:
> 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!

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



More information about the asterisk-dev mailing list