You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Al...@csiro.au on 2006/01/03 05:20:27 UTC

using APR on fedora core 3

Hi,

 

This is probably an obvious question, but I am having a problem using
APR. I am developing some software using C++ and APR on Windows XP and
Fedora Core 3. I am intending to use APR as a shared library. So far I
have managed to successfully build APR on Windows XP, I have written
some code using it, and have managed to get the program running. However
on Fedora it is a different story. I have compiled APR (merely using:
./configure, make), and I then tried compiling my code using APR and am
getting an error during compilation:

 

INT64_C undeclared

 

A quick search on the mailing list didn't really yield an answer. Does
anybody have any suggestions?

 

Thanks

 

Alex

 


Re: using APR on fedora core 3

Posted by INOUE Seiichiro <in...@ariel-networks.com>.
Hi,

> INT64_C undeclared

I guess you're using the older APR.
I formerly met the same error with the older APR.

We need the following code (the code is excerpted from the latest apr.h.in).

#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
/* C99 7.18.4 requires that stdint.h only exposes INT64_C 
 * and UINT64_C for C++ implementations if this is defined: */
#define __STDC_CONSTANT_MACROS
#endif


- INOUE Seiichiro <in...@ariel-networks.com>

Re: using APR on fedora core 3

Posted by Uwe Zeisberger <ze...@informatik.uni-freiburg.de>.
Hi Alex,

Alex.Krumm-Heller@csiro.au wrote:
> This is probably an obvious question, but I am having a problem using
> APR. I am developing some software using C++ and APR on Windows XP and
> Fedora Core 3. I am intending to use APR as a shared library. So far I
> have managed to successfully build APR on Windows XP, I have written
> some code using it, and have managed to get the program running. However
> on Fedora it is a different story. I have compiled APR (merely using:
> ./configure, make), and I then tried compiling my code using APR and am
> getting an error during compilation:
> 
> INT64_C undeclared
Did you use the compiler flags given by apr-config?

Try something like:

	`apr-config --cc` `apr-config --cflags --cppflags` -c lala1.c
	`apr-config --cc` `apr-config --cflags --cppflags` -c lala2.c
	`apr-config --cc` `apr-config --link-ld --libs` -o lala lala1.o lala2.o

Probably using g++ instead of gcc (aka `apr-config --cc`) works if you
need C++.

HTH
Uwe

-- 
Uwe Zeisberger

http://www.google.com/search?q=gigabyte+in+bit