Thanks to everyone for suggesting the solutions,

I tried, as proposed by various users and developers in response to my
query, using the -I<path of apr-$installedversion-config>. That too did not
work. Finally I managed to serve my purpose using gcc command, executing
apr-$installedversion-config file (ie apr-1-config installed in
/usr/local/apr/bin in my case). I use this file to print the options
required for complition using APR library.

Here is a snapshot of what I used:


[r...@a104cc-user86 bin]# gcc $(./apr-1-config --includes) $(./apr-1-config
--libs) $(./apr-1-config --link-ld) $(./apr-1-config --cflags)
$(./apr-1-config --cppflags)  /cat.c


The options I have used with ./apr-1-config can be better undestood by
simply executing that file at shell.

Thanks once again for helping us.

Regards,
Sameer Kumar
B.Tech, Computer Engineering
Institute of Technology,
Nirma University,
Ahmedabad, Gujarat
email: [email protected]
         [email protected]
Phone: +919375220396


On Wed, Mar 25, 2009 at 6:06 PM, Eric Covener <[email protected]> wrote:

> On Wed, Mar 25, 2009 at 5:13 AM, SAMEER KUMAR <[email protected]>
> wrote:
> > I am new to APR. I am going to use it for developing a Apache like hybrid
> > architecture for OpenSIPS [www.opensips.org], which an open source
> SIP[RFC
> > 3261] server.
> >
> > I have downloaded APR and installed it on my Fedora 9 machine using the
> > configure and make commands. I tested the installation with testall. But
> I
> > am not able to use this in my programs and not able to link to the header
> > files in APR.
> >
> > I am using a cat1.c program to run, in which I am using functions of APR
> > module. I have tried these gcc commands:
> >
> > gcc -l lapr-1  /cat1.c
> >
> > gcc /cat1.c -L. -lapr-1
> >
> > my working directory is
> >
> > /usr/local/apr/lib
> >
> > I am getting following set of errors:
> >
> > /cat1.c:1:23: error: apr_pools.h: No such file or directory
>
> You're not finding the installed APR headers.  Try adding apr-1-config
>  --includes to your compiler flags.
>
> (you might need to find where apr-1-config was installed when you built
> apr)
>
>
> --
> Eric Covener
> [email protected]
>

Reply via email to