Simple C++ Compile Error
Robert Evans
bobsphysics at yahoo.com
Tue Aug 12 16:25:11 CEST 2008
Leaving off the full path name in the #include and using "-I" option to specify include path works fine, as should have been obvious to me. Sorry for all the commotion.
Bob
----- Original Message ----
From: Marc Glisse <marc.glisse at normalesup.org>
To: Tim Van Holder <tim.vanholder at anubex.com>
Cc: gmp-bugs at swox.com; Robert Evans <bobsphysics at yahoo.com>
Sent: Tuesday, August 12, 2008 5:46:20 AM
Subject: Re: Simple C++ Compile Error
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gmplib.org/list-archives/gmp-bugs/attachments/20080812/ee8b67df/attachment.html
More information about the gmp-bugs
mailing list