apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mr.Ch...@area99.dk
Subject Re: Newbie question: Compiling helloworld-APR.c under Windows
Date Fri, 25 Jan 2008 08:53:55 GMT
Quoting Joachim Ziegler <ziegler@mpi-sb.mpg.de>:

Hi Joachim.

Try including <apr.h> before apr_general.

/Ruben

> Hello,
>
> we are evaluating APR as a possible base for a multi-platform server project.
>
> I have successfully compiled and executed the following APR-"Hello
> world!" program under Unix:
>
> #include <stdio.h>
> #include <apr_general.h>
>
> int main(int argc, const char *argv[])
> {
>     apr_status_t rv;
>     rv = apr_initialize();
>     printf( "Hello APR world!\n");
>     apr_terminate();
>     return 0;
> }
>
>
> Now I try to compile this with Visual Studio 8 (2005). I have
> successfully built the APR libs and the test suite with Studio.
>
> But when compiling the above program, I get the following error message:
>
> ------ Build started: Project: TestAPR, Configuration: Debug Win32 ------
> Compiling...
> try-helloworld-APR.c
> d:\apr\apr\include\apr_errno.h(52) : error C2061: syntax error :
> identifier 'apr_strerror'
> d:\apr\apr\include\apr_errno.h(52) : error C2059: syntax error : ';'
> d:\apr\apr\include\apr_errno.h(52) : error C2059: syntax error : 'type'
>
> The respective line in apr_errno.c reads
>
> APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
>                                  apr_size_t bufsize);
>
> It seems that the macro APR_DECLARE is not defined.
>
> I have spent one day to read all available documentation on APR and
> have searched the mailing list archive for messages concerning how to
> compile with APR under windows, but I just could not find out what
> settings I have to specify to use the APR libs with Visual Studio.
>
> The page http://apr.apache.org/compiling_win32.html just says
>
>> Integrating the Library
>>
>>    We should tell ya'll 'bout this, no?
>
> :-)
>
> Can you please help me? Any hints are highly appreciated.
>
> Thank you and kind regards,
> Joachim



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Mime
View raw message