[asterisk-dev] MySQL Apps compilation problem in asterisk 1.4

Moises Silva moises.silva at gmail.com
Fri May 30 16:05:17 CDT 2008


Gustavo,

I'm not an expert at all but this may help you (or not).

Take a look at apps/app_osplookup.c

You should see some special comments at the top of the file:

/*** MODULEINFO
        <depend>osptk</depend>
        <depend>ssl</depend>
 ***/

Probably someone that really understands how menuselect works can
explain which keywords are accepted, but I believe "<depend>" should
work for you. There you should declare your dependency on MySQL
library, considering you want to link with libmysqlclient.so, add
<depend>mysqlclient</depend>

Once done that I believe you will have to add an entry into configure.ac

 AST_EXT_LIB_SETUP([MYSQLCLIENT], [MySQL Library, [mysqlclient])

Now edit makeopts.in

MYSQLCLIENT_INCLUDE=@MYSQLCLIENT_INCLUDE@
MYSQLCLIENT_LIB=@MYSQLCLIENT_LIB@

I'm not quite sure what this last step is for but I do remember I had
to do it once when I was doing something similar as you are doing now.

Finally just execute

 ./bootstrap.sh
./configure && make install

That should do the trick.

Moy



On Fri, May 30, 2008 at 3:14 PM, Gustavo A Gonzalez
<ggonzalez at despegar.com> wrote:
> Hello im not sure if that is the correct list, but, I am working on an
> application that connect to MYSQL to insert users data, I copy my
> application on /usr/src/asterisk1.4/apps/ and run make and make install,
> after that I saw that my app when looking for MYSQL functions like
> mysql_init, asterisk show me an error like undefined symbol: mysql_init.
> This is not because I don't have mysql installed but because when I am doing
> make, asterisk don't link my app with mysql runtime library. Is there a
> howto to develop and compile an external module with NN libraries in
> asterisk 1.4. How I can get my application working? Thanks!!!
>
> Gustavo A. González
> Dto. de Infraestructura
> Despegar.com, Inc.
> ggonzalez at despegar.com
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>



-- 
"I do not agree with what you have to say, but I'll defend to the
death your right to say it." Voltaire



More information about the asterisk-dev mailing list