Simple C++ Compile Error
Marc Glisse
marc.glisse at normalesup.org
Tue Aug 12 12:46:20 CEST 2008
On Tue, 12 Aug 2008, Tim Van Holder wrote:
>>> #include </home/bevans/gmp-4.2.3/include/gmpxx.h>
[...]
> While Robert's code is unusual (especially the use of <> instead of ""
> when specifying a full path to a header), it's certainly valid C++.
But not a valid use of gmpxx. You can compare to other packages. For
instance, freetype or gtk typically require -I/usr/include/freetype2 or
-I/usr/include/gtk-2.0. These packages have many header files that include
each other, but still use the <> notation. I don't see why gmp should be
different.
> Would it not make sense for gmpxx.h to include gmp.h with '#include
> "gmp.h"'?
> That way, no matter how you include gmpxx.h, it will prefer the gmp.h
> that sits alongside it.
I don't like it (but I don't decide). However, having a test in gmpxx that
checks whether the version of gmp.h included matches and outputs a warning
(not an error, there can always be good reasons to do strange things)
otherwise would help diagnose this kind of issue.
--
Marc Glisse
More information about the gmp-bugs
mailing list