[Asterisk-Dev] Question about compiling a module for Asterisk with
CPP stuff
Leo Moll
leo at yeasoft.com
Thu Feb 3 18:07:53 MST 2005
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!
The module contains some source files written in CPP but I have used
only straight CPP without STL or similar stuff.
Here you can see an excerpt from my Makefile:
CFLAGS+=-ggdb
LDFLAGS+=-lstdc++
all: nlsLib app_say_pattern.so
nlsLib: nlsEngine.o nlsUtils.o nlsParser.o
$(CC) $(CFLAGS) $(LDFLAGS) nlsEngine.o nlsUtils.o nlsParser.o -o nlsTest
CFLAGS+=-fPIC -I$(ASTERISKINC) -DAST_CONFIG_DIR=\"$(AST_CONFIG_DIR)\"
app_say_pattern.so: nlsEngine.o nlsParser.o nlsUtils.o app_say_pattern.o
$(CC) -shared -Xlinker -x -o $@ nlsEngine.o nlsUtils.o app_say_pattern.o
Does anyone here have an idea what I'm doing wrong? Any help would be
greatly appreciated.
Thank you in advance!
More information about the asterisk-dev
mailing list