Vincent Lefevre vincent at
Mon Aug 22 14:37:11 CEST 2022

On 2022-08-22 14:17:08 +0200, Paul Zimmermann wrote:
>        Hi,
> the fine manual says:
>    All declarations needed to use GMP are collected in the include file
>    'gmp.h'.  It is designed to work with both C and C++ compilers.
> 	#include <gmp.h>
>       Note however that prototypes for GMP functions with 'FILE *'
>    parameters are only provided if '<stdio.h>' is included too.
> 	#include <stdio.h>
> 	#include <gmp.h>
> What is the reason why <stdio.h> is not included by default?

I suppose that it may not be provided everywhere, e.g. on some
freestanding implementations (if supported by GMP).

Even on desktop machines, if libc6-dev is not installed:

BTW, in Debian, libgmp-dev doesn't depend on libc6-dev.

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the gmp-devel mailing list