summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2022-01-20 23:04:42 +0100
committerMarc Glisse <marc.glisse@inria.fr>2022-01-20 23:04:42 +0100
commitbde55f08201abf7637bb7bae0cbdc86b83af891e (patch)
treef8455b131f75a10ee3087710d60c3168d28f4d88 /doc
parent8bc636d74baf89c5edf02501ea478588623a3750 (diff)
downloadgmp-bde55f08201abf7637bb7bae0cbdc86b83af891e.tar.gz
Clarify doc of C++ includes and library
Diffstat (limited to 'doc')
-rw-r--r--doc/gmp.texi13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/gmp.texi b/doc/gmp.texi
index 4406addc8..efa40722a 100644
--- a/doc/gmp.texi
+++ b/doc/gmp.texi
@@ -1860,7 +1860,9 @@ to be incompatible with future versions of GMP.}
@cindex Include files
@cindex @code{#include}
All declarations needed to use GMP are collected in the include file
-@file{gmp.h}. It is designed to work with both C and C++ compilers.
+@file{gmp.h}, except for the @ref{C++ Class Interface} which comes with its
+own separate header @file{gmpxx.h}. @file{gmp.h} is designed to work with
+both C and C++ compilers.
@example
#include <gmp.h>
@@ -1868,7 +1870,7 @@ All declarations needed to use GMP are collected in the include file
@cindex @code{stdio.h}
Note however that prototypes for GMP functions with @code{FILE *} parameters
-are only provided if @code{<stdio.h>} is included too.
+are only provided if @code{<stdio.h>} is included before.
@example
#include <stdio.h>
@@ -1892,9 +1894,10 @@ gcc myprogram.c -lgmp
@end example
@cindex @code{libgmpxx}
-GMP C++ functions are in a separate @file{libgmpxx} library. This is built
-and installed if C++ support has been enabled (@pxref{Build Options}). For
-example,
+GMP C++ functions are in a separate @file{libgmpxx} library, including the
+@ref{C++ Class Interface} but also @ref{C++ Formatted Output} for regular
+GMP types. This is built and installed if C++ support has been enabled
+(@pxref{Build Options}). For example,
@example
g++ mycxxprog.cc -lgmpxx -lgmp