That didn't help -- I still get all the same errors.




"Wesley W. Garland" <wes.garland@gmail.com>

06/01/2005 05:12 PM
Please respond to
wes

To
Nicholas Merryman/Raleigh/IBM@IBMUS
cc
Subject
Re: Syntax errors in APR header files when included in my project





Try this:

#ifdef __cplusplus
extern "C" {
#endif

#include <apr.h>
#include <apr_version.h>
#include <apr_portable.h>
#include <apr_strings.h>
#include <apr_tables.h>
#include <apr_mmap.h>
#include <apr_signal.h>
#include <apr_poll.h>
#include <apr_hash.h>
#include <apr_lib.h>

#ifdef __cplusplus
}
#endif

WFM

Wes

On 6/1/05, Nicholas Merryman <nmerrym@us.ibm.com> wrote:
>  
> apr.h wasn't included, but including it (in Specific.h or in ClassImpl.cpp)
> didn't fix the errors.
>  
> Is there documentation somewhere that explains thing like that?  I can't
> find any 'this is how you use APR' documentation anywhere .. just a few
> one-line function descriptions on apr.apache.org...
>  
> Nick
>  
>  
>  
>  
>  
>  "Dan Johnson" <dmj@nrtc.northrop.com>
>
> 06/01/2005 12:39 PM
>  
> To Nicholas Merryman/Raleigh/IBM@IBMUS, <dev@apr.apache.org>
>  
> cc
>  
> Subject RE: Syntax errors in APR header files when included in my project
>  
>  
>  
>  
>  
> These look like the errors you'd get if apr.h weren't included. Is there an
> error about not being able to find it?
>
>  
>
> Dan
>
>  
>
> Daniel M. Johnson Software Engineer | One Hornet Way, MS 9M52/W6
>  Northrop Grumman Integrated Systems | El Segundo, CA 90245-2804
>  J-UCAS Vehicle Management Systems | Telephone: (310) 345-5253
>
> -----Original Message-----
>  From: Nicholas Merryman [mailto:nmerrym@us.ibm.com]
>  Sent: Wednesday, June 01, 2005 8:56 AM
>  To: dev@apr.apache.org
>  Subject: Syntax errors in APR header files when included in my project
>
>  
>
>
>  I'm working on integrating APR into a project I'm working on.  When I
> #include "apr_pools.h" in a header file of mine (Specific.h), which is then
> included by several files in my project, I get dozens of errors from the APR
> header files when compiling my project (the APR library compiles cleanly).
> I'm doing this so my function headers can include apr_pool_t.  Is there a
> different apr header I should be using to do this?  I wouldn't think so...
>  
>  This problem doesn't seem to pop up when I #include "apr_pools.h" in
> individual .cpp files, as far as I've noticed.
>  
>  I'm working on Windows.
>  
>  cl <flags> ClassImpl.cpp
>  ClassImpl.cpp
>  c:\code\linus\src\apr\apr\include\apr_errno.h(51) : error
> C2146: syntax error :
>  missing ';' before identifier 'apr_strerror'
>  c:\code\linus\src\apr\apr\include\apr_errno.h(52) : error
> C2061: syntax error :
>  identifier 'apr_size_t'
>  c:\code\linus\src\apr\apr\include\apr_general.h(159) :
> warning C4273: 'memchr' :
>  inconsistent dll linkage
>  c:\code\linus\src\apr\apr\include\apr_general.h(175) :
> error C2146: syntax error
>  : missing ';' before identifier 'apr_initialize'
>  c:\code\linus\src\apr\apr\include\apr_general.h(175) :
> error C2733: second C lin
>  kage of overloaded function 'APR_DECLARE' not allowed
>        
> c:\code\linus\src\apr\apr\include\apr_general.h(175) : see
> declaration o
>  f 'APR_DECLARE'
>  c:\code\linus\src\apr\apr\include\apr_general.h(189) :
> error C2146: syntax error
>  : missing ';' before identifier 'apr_app_initialize'
>  c:\code\linus\src\apr\apr\include\apr_general.h(202) :
> error C2146: syntax error
>  : missing ';' before identifier 'apr_terminate'
>  c:\code\linus\src\apr\apr\include\apr_general.h(213) :
> error C2146: syntax error
>  : missing ';' before identifier 'apr_terminate2'
>  
>  etc etc etc
>  
>  Any help is appreciated.
>
>  
>
>
>
>
>
>
>
>
>
>
>
>
>
>


--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102