You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by sumit singhal <su...@yahoo.com> on 2006/01/17 06:48:58 UTC
getting started with APR
Hi
I am starting a project in which I want to use APR for
portability.
I download APR version 1.2.2 from "http://apr.apache.org/download.cgi#apr1"
and I am using Redhat/Linux 9.
As I am a newbie to APR and I have no prior experience of
using APR, so I started learning it from:
"http://dev.ariel-networks.com/apr/apr-tutorial/html/apr-tutorial.html#toc19"
But when I try to run my First Program:
"http://dev.ariel-networks.com/apr/apr-tutorial/sample/mp-sample.c",
with the command:
"cc -I/usr/local/apr/include/apr-1/ -L/usr/local/apr/lib/ mp-sample.c -o mp-sample",
I face the error:
"/usr/local/apr/include/apr-1/apr.h:270: parse error before "apr_off_t""
Thanks & Regards
Sumit Singhal
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
Re: getting started with APR
Posted by Joe Orton <jo...@redhat.com>.
On Mon, Jan 16, 2006 at 09:48:58PM -0800, sumit singhal wrote:
> I am starting a project in which I want to use APR for portability. I
> download APR version 1.2.2 from
> "http://apr.apache.org/download.cgi#apr1" and I am using Redhat/Linux
> 9. As I am a newbie to APR and I have no prior experience of using
> APR, so I started learning it from:
> "http://dev.ariel-networks.com/apr/apr-tutorial/html/apr-tutorial.html#toc19"
> But when I try to run my First Program:
> "http://dev.ariel-networks.com/apr/apr-tutorial/sample/mp-sample.c",
> with the command: "cc -I/usr/local/apr/include/apr-1/
> -L/usr/local/apr/lib/ mp-sample.c -o mp-sample", I face the error:
> "/usr/local/apr/include/apr-1/apr.h:270: parse error before
> "apr_off_t""
You need to pass the output of the command:
apr-1-config --cppflags --includes --cflags
to cc, e.g.
CFLAGS = `/path/to/apr-1-config --cppflags --includes --cflags`
if you're using a Makefile.
Regards,
joe
Re: getting started with APR
Posted by Maxime Petazzoni <ma...@bulix.org>.
* Avi Rosenschein <ar...@gmail.com> [2006-01-17 11:50:00]:
> You probably need to include the proper header files in your mp-sample.c:
> #include <apr.h>
Every APR header file does that already, so including apr_general.h is
enough.
It's another problem I've not been able to solve by myself, too, like
a missing system header file or something
apr_off_t => off64_t => off_t => ?
- Sam
--
Maxime Petazzoni (http://www.bulix.org)
-- gone crazy, back soon. leave message.
Re: getting started with APR
Posted by Avi Rosenschein <ar...@gmail.com>.
On 1/17/06, sumit singhal <su...@yahoo.com> wrote:
>
>
> I face the error:
> "/usr/local/apr/include/apr-1/apr.h:270: parse error before "apr_off_t""
>
>
You probably need to include the proper header files in your mp-sample.c:
#include <apr.h>
-- Avi