[asterisk-dev] undefined symbol: PQsetdbLogin

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri May 22 01:18:00 CDT 2009


On Thursday 21 May 2009 23:07:47 Alex Balashov wrote:
> Joel Jn-Francois wrote:
> > The problem arises when I try to load my app within asterisk "module
> > load app_callingcard.so". I get the following error message:
> > WARNING[31732]: loader.c:417 load_dynamic_module: Error loading module
> > 'app_callingcard.so': /usr/lib/asterisk/modules/app_
> > callingcard.so: undefined symbol: PQsetdbLogin.
>
> You need to link against libpq when you link the asterisk binary (the
> gcc -o / ld stage), e.g. -lpq.

And the way to do this is to place the following comment within your C source
file:

/*** MODULEINFO
    <depend>pgsql</depend>
 ***/

-- 
Tilghman



More information about the asterisk-dev mailing list