Dear all I am get the following problem when trying to compile app_meetme2 using mysql...it seems to want to use pgsql.....? anyone my Makefile looks like app_meetme2.o: app_meetme2.c #$(CC) -pipe $(CFLAGS) -c -o app_meetme2.o app_meetme2.c $(CC) -pipe -I/usr/local/include/mysql -L/usr/local/lib/mysql $(CFLAGS) -c -o app_meetme2.o app_meetme2.c app_meetme2.so: app_meetme2.o $(CC) $(SOLINK) -o $@ $< -lpq -I/usr/local/include/mysql -L/usr/local/li b/mysql -lmysqlclient # $(CC) $(SOLINK) -o $@ $< -lgdbm app_meetme2.o app_meetme2.c app_meetme2.c: In function `launch_query': app_meetme2.c:138: error: `PGconn' undeclared (first use in this function) app_meetme2.c:138: error: (Each undeclared identifier is reported only once app_meetme2.c:138: error: for each function it appears in.) app_meetme2.c:138: error: `conn' undeclared (first use in this function) app_meetme2.c:139: error: `PGresult' undeclared (first use in this function) app_meetme2.c:139: error: `res' undeclared (first use in this function) app_meetme2.c:151: warning: implicit declaration of function `PQsetdbLogin' app_meetme2.c:152: warning: implicit declaration of function `PQstatus' app_meetme2.c:152: error: `CONNECTION_BAD' undeclared (first use in this functio n) app_meetme2.c:154: warning: implicit declaration of function `PQerrorMessage' app_meetme2.c:154: warning: format argument is not a pointer (arg 6) app_meetme2.c:155: warning: implicit declaration of function `PQfinish' app_meetme2.c:162: warning: implicit declaration of function `PQexec' app_meetme2.c:163: warning: implicit declaration of function `PQresultStatus' app_meetme2.c:163: error: `PGRES_TUPLES_OK' undeclared (first use in this functi on) app_meetme2.c:166: warning: implicit declaration of function `PQclear' app_meetme2.c:171: warning: implicit declaration of function `PQntuples' app_meetme2.c:179: warning: implicit declaration of function `PQgetvalue' app_meetme2.c:179: warning: passing arg 1 of `atoi' makes pointer from integer w ithout a cast app_meetme2.c:180: warning: passing arg 1 of `atoi' makes pointer from integer w ithout a cast app_meetme2.c:181: warning: passing arg 1 of `atoi' makes pointer from integer w ithout a cast app_meetme2.c:182: warning: passing arg 1 of `atoi' makes pointer from integer w ithout a cast app_meetme2.c:183: warning: passing arg 1 of `atoi' makes pointer from integer w ithout a cast app_meetme2.c:184: warning: passing arg 1 of `atoi' makes pointer from integer w ithout a cast app_meetme2.c:185: warning: passing arg 2 of `strcpy' makes pointer from integer without a cast app_meetme2.c: In function `launch_query_onefield': app_meetme2.c:254: error: `PGconn' undeclared (first use in this function) app_meetme2.c:254: error: `conn' undeclared (first use in this function) app_meetme2.c:255: error: `PGresult' undeclared (first use in this function) app_meetme2.c:255: error: `res' undeclared (first use in this function) app_meetme2.c:268: error: `CONNECTION_BAD' undeclared (first use in this functio n) app_meetme2.c:270: warning: format argument is not a pointer (arg 6) app_meetme2.c:277: error: `PGRES_COMMAND_OK' undeclared (first use in this funct ion) app_meetme2.c:295: error: `PGRES_TUPLES_OK' undeclared (first use in this functi on) app_meetme2.c:296: warning: format argument is not a pointer (arg 6) app_meetme2.c:302: warning: passing arg 1 of `strlen' makes pointer from integer without a cast app_meetme2.c:307: warning: format argument is not a pointer (arg 3) app_meetme2.c:331: warning: passing arg 1 of `strlen' makes pointer from integer without a cast app_meetme2.c:336: warning: format argument is not a pointer (arg 3) app_meetme2.c: At top level: app_meetme2.c:645: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_I NITIALIZER__' undeclared here (not in a function) app_meetme2.c: In function `count_exec': app_meetme2.c:1547: error: too few arguments to function `ast_say_number' gmake[1]: *** [app_meetme2.o] Error 1
The error messages are Postgres related. You need to have a special postgres include file (postgres-dev files) to make it compile or disable postpres support somehow. I'm using debian and the the concering include file resided in a subdirectory of what asterisk was told. Jens
The code is configured to allow use of either mysql or postgres, so you will need to install the postgres-dev package, or comment out all postgres related code. Once you have the postgres libraries installed you have two more changes to make. line 645 needs to become: AST_MUTEX_DEFINE_STATIC(conflock); And line 1547 should be this: res = ast_say_number(chan, cnt, "", chan->language, (char *) NULL); Dan -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Jer Sent: Saturday, March 05, 2005 2:06 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] cant compile app_meetme2 At 04:34 AM 3/5/2005, you wrote:>The error messages are Postgres related. >You need to have a special postgres include file (postgres-dev files)to make>it compile or disable postpres support somehow. > >I'm using debian and the the concering include file resided in asubdirectory>of what asterisk was told.if this is the case why dont i see a include file missing error someplace? or am I missing something......>Jens >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users_______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users