Asterisk 1.2.4 and ODBC (app_dbodbc.c) LINK ERRORS!


#1

bira_more wrote:

/usr/include/asterisk/file.h:27:2: error: #error You must include stdio.h before file.h!
Change order of h files - it is not that hard.
For second problem you must include library pthread

Thanks but now I am getting Link errors:

/usr/lib/gcc/i386-redhat-linux/4.0.0/…/…/…/crt1.o(.text+0x18): In function _start': : undefined reference tomain’
app_dbodbc.o(.text+0x50): In function lookupblacklist_exec': app_dbodbc.c: undefined reference toast_log’
app_dbodbc.o(.text+0xb2):app_dbodbc.c: undefined reference to ast_update_use_count' app_dbodbc.o(.text+0xe8):app_dbodbc.c: undefined reference tooption_verbose’
app_dbodbc.o(.text+0x11a):app_dbodbc.c: undefined reference to ast_log' app_dbodbc.o(.text+0x15a):app_dbodbc.c: undefined reference tooption_verbose’
app_dbodbc.o(.text+0x18c):app_dbodbc.c: undefined reference to ast_log' app_dbodbc.o(.text+0x1d2):app_dbodbc.c: undefined reference toast_exists_extension’
app_dbodbc.o(.text+0x283):app_dbodbc.c: undefined reference to ast_update_use_count' app_dbodbc.o(.text+0x32f): In functionlookupcidname_exec’:
app_dbodbc.c: undefined reference to ast_log' app_dbodbc.o(.text+0x391):app_dbodbc.c: undefined reference toast_update_use_count’
app_dbodbc.o(.text+0x3d1):app_dbodbc.c: undefined reference to ast_set_callerid' app_dbodbc.o(.text+0x3da):app_dbodbc.c: undefined reference tooption_verbose’
app_dbodbc.o(.text+0x3f4):app_dbodbc.c: undefined reference to ast_verbose' app_dbodbc.o(.text+0x48c):app_dbodbc.c: undefined reference toast_update_use_count’
app_dbodbc.o(.text+0x551): In function odbcdeltree_exec': app_dbodbc.c: undefined reference toast_log’

Orignal Message:

I am having problems with adding the ODBC applications to asterisk. The “wiki-Asterisk+app_dbodbc” page at the voip-info.org provides a file named app_dbodbc.c for this purpose but does not compile on my system. Errors are:


/usr/include/asterisk/file.h:27:2: error: #error You must include stdio.h before file.h!
In file included from /usr/include/asterisk/linkedlists.h:23,
from /usr/include/asterisk/chanvars.h:26,
from /usr/include/asterisk/channel.h:111,
from /usr/include/asterisk/file.h:30,
from app_dbodbc.c:34:
/usr/include/asterisk/lock.h: In function ‘ast_mutex_init’:
/usr/include/asterisk/lock.h:517: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use in this function)
/usr/include/asterisk/lock.h:517: error: (Each undeclared identifier is reported only once
/usr/include/asterisk/lock.h:517: error: for each function it appears in.)
In file included from app_dbodbc.c:34:
/usr/include/asterisk/file.h: At top level:
/usr/include/asterisk/file.h:56: error: syntax error before ‘’ token
/usr/include/asterisk/file.h:57: error: syntax error before ‘
’ token

If its a version problem, then is there an “app_dbodbc.c” for 1.2.4??
I’ll appreciate any help.

Waqar,
Infinilogics


#2

Please refer to this post => forums.digium.com/viewtopic.php?t=4424

Please keep the posts in the same thread on the subject already created.