You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by SAMEER KUMAR <sa...@gmail.com> on 2009/03/26 23:01:18 UTC

Re: [Problem] Not able to Link APR to my programs

Well thnx guys...

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.
>
Lately I realized that, I have mistaken your advice being a novice.

Here is a snapshot of what I used:
>


> *[root@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
> *


You people suggested to add same thing, what i have added to my command (but
in a bit different way)...

Nick Kew wrote an excellent book on Apache 2 modules; the old "Writing
> Apache Modules in Perl and C" is still somewhat relevant as well.
>

I would like to know if some one can help me with material on programming
with APR.

Thnx alot guys...

Regards,
Sameer Kumar
B.Tech, Computer Engineering
Institute of Technology,
Nirma University,
Ahmedabad, Gujarat
email: sameer.kasi200x@gmail.com
          05bce032@nirmauni.ac.in
Phone: +919375220396

[Problem] Not able to Link APR to my programs

Posted by SAMEER KUMAR <sa...@gmail.com>.
Well thnx guys...

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.
>
Lately I realized that, I have mistaken your advice being a novice.

Here is a snapshot of what I used:
>


> *[root@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
> *


You people suggested to add same thing, what i have added to my command (but
in a bit different way)...

Nick Kew wrote an excellent book on Apache 2 modules; the old "Writing
> Apache Modules in Perl and C" is still somewhat relevant as well.
>

I would like to know if some one can help me with material on programming
with APR.

Thnx alot guys...

Regards,
Sameer Kumar
B.Tech, Computer Engineering
Institute of Technology,
Nirma University,
Ahmedabad, Gujarat
email: sameer.kasi200x@gmail.com
          05bce032@nirmauni.ac.in
Phone: +919375220396

Re: [Problem] Not able to Link APR to my programs

Posted by SAMEER KUMAR <sa...@gmail.com>.
>
>
>
>    1.
>    $> export APR_LIBS="`apr-1-config --cflags --cppflags --includes --ldflags --link-ld --libs`"
>
>    2.
>    $> export APU_LIBS="`apu-1-config --includes --ldflags --link-ld --libs`"
>
>    3. $> gcc $APR_LIBS $APU_LIBS srcFile.c -o prgName
>
>

I guess you doing the same that I had done or others have suggested... your
way of doing is different...

Actually i copied the above from one of the writeups i did with APR on my
> blog. It's not much but maybe that helps you get started.
>
> http://blogs.coffeecrew.org/blogs/datapile/tags/apr
>
>

Thanks for the link :) As i said in previous posts. Help in any form is
appreciated.


Regards,
Sameer Kumar
B.Tech, Computer Engineering
Institute of Technology,
Nirma University,
Ahmedabad, Gujarat
email: sameer.kasi200x@gmail.com
          05bce032@nirmauni.ac.in
Phone: +919375220396

Re: [Problem] Not able to Link APR to my programs

Posted by Jens Frey <je...@coffeecrew.org>.
> Well thnx guys...
> 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.
> Lately I realized that, I have mistaken your advice being a novice.
>
> Here is a snapshot of what I used:
>
> [root@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
Maybe that works for you? I could not find the previous post

$> export APR_LIBS="`apr-1-config --cflags --cppflags --includes -- 
ldflags --link-ld --libs`"
$> export APU_LIBS="`apu-1-config --includes --ldflags --link-ld -- 
libs`"
$> gcc $APR_LIBS $APU_LIBS srcFile.c -o prgName

> You people suggested to add same thing, what i have added to my  
> command (but in a bit different way)...
>
> Nick Kew wrote an excellent book on Apache 2 modules; the old  
> "Writing Apache Modules in Perl and C" is still somewhat relevant as  
> well.
>
> I would like to know if some one can help me with material on  
> programming with APR.
Actually i copied the above from one of the writeups i did with APR on  
my blog. It's not much but maybe that helps you get started.

http://blogs.coffeecrew.org/blogs/datapile/tags/apr

Hope i could help,

Jens