[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C -> C++ bug in header file gmp.h
From: |
Kevin Ryde |
Subject: |
Re: C -> C++ bug in header file gmp.h |
Date: |
Thu, 28 Feb 2002 09:01:41 +1000 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i386-debian-linux-gnu) |
<address@hidden> writes:
>
> Unfortunately, two names were accidentally omitted: the variables
> extern int __GMP_DECLSPEC gmp_errno;
> extern __gmp_const char * __gmp_const __GMP_DECLSPEC gmp_version;
> As a result, it is impossible to use these two names from a C++
> application when the GMP library was built as C.
I never knew plain variables were mangled. My ignorance of C++ is
exposed yet again. What compiler is this?
> The (fairly obvious) fix is to wrap extern "C" around the section
> of gmp-h.in that declares these two variables. See the following
> patch.
Yep, thanks. Though I think in fact I'll move them up to the existing
extern "C" block.