Next: present but cannot be compiled, Previous: Interpreting configure warnings, Up: Problems with configure [Contents][Index]
The following configuration warning was encountered on various BSD Unix systems (OpenBSD 3.4 and FreeBSD 4.10-BETA , both IA-32) and inhibited the building of the coNCePTuaL run-time library:
PRId64 is not a valid printf conversion specifier for values of type int64_t |
The config.log
file indicated the source of the problem was a ‘syntax error
before `PRId64'’ that was reported when compiling a sample
program. A brief search revealed that the PRId64
macro is not
defined in any of the standard C header files on the systems in
question. The solution turned out to be to configure with ./configure
--with-printf-format='"lld"' to instruct the C compiler to
use
printf()
format strings such as
‘%lld’ when outputting 64-bit signed integers. The
extra pair of double quotes is required because the conversion
specifier is used in constructs like the following:
printf ("The number is %10" conversion-specifier "!\n", num);
Most—but apparently not all—C compilers define the PRId64
macro (“PRI
nt signed d
ecimal number of
length 64
bits”) in one the standard
header files. Typical values of PRId64
include the
strings "lld"
and "ld"
.