apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dharmarth <dharma...@gmail.com>
Subject Newbie question : compiling helloworld.c on ubuntu7.10
Date Mon, 12 May 2008 12:45:17 GMT

Hi
I have successfully compiled and build APR on ubuntu7.10.
I am trying to run following hello world program.

#include <stdio.h>
#include <apr.h>
#include <apr_general.h>

int main(int argc, const char *argv[])
{
     apr_status_t rv;
     rv = apr_initialize();
     printf( "Hello world!\n");
     apr_terminate();
     return 0;
} 

I am giving following command to generate executable.

gcc hello_world_apr.c -I"/usr/local/apr/include/apr-1"
-L"/usr/local/apr/lib" -lapr-1

But, it doesnt compile and gives following error trace.

In file included from hello_world_apr.c:2:
/usr/local/apr/include/apr-1/apr.h:273: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
or ‘__attribute__’ before ‘apr_off_t’

Any help/hints are highly appreciated. 

Thank you,
Dharmarth.


-- 
View this message in context: http://www.nabble.com/Newbie-question-%3A-compiling-helloworld.c-on-ubuntu7.10-tp17186844p17186844.html
Sent from the APR Dev (Apache Portable Runtime) mailing list archive at Nabble.com.


Mime
View raw message