How to use gmp_version, mpir_version, and mp_bits_per_limb

143 views
Skip to first unread message

ErichSt

unread,
Dec 18, 2015, 4:50:09 PM12/18/15
to mpir-devel
I'm getting "unresolved external symbol __mpir_version referenced" when trying to use "mpir_version" as documented in 3.9 Useful Macros and Constants.

Am I doing something wrong? An uppercase "MPIR_VERSION" seems to work.

Similar issue "unresolved external symbol __gmp_version referenced" for "gmp_version"; again "GMP_VERSION" seems to work.

"mp_bits_per_limb" too isn't working for me, and here the uppercased name doesn't work either.

Bill Hart

unread,
Dec 19, 2015, 12:29:31 AM12/19/15
to mpir-devel
On 18 December 2015 at 22:50, ErichSt <erich.st...@gmail.com> wrote:
I'm getting "unresolved external symbol __mpir_version referenced" when trying to use "mpir_version" as documented in 3.9 Useful Macros and Constants.

I must admit, I don't understand why we have the following

#define gmp_version __gmp_version
__GMP_DECLSPEC extern __gmp_const char * __gmp_const gmp_version;

That looks wrong to me. But on the other hand, there are external libraries that use it just fine. I'm not sure how.

Apparently you are supposed to use __gmp_version, etc.


Am I doing something wrong?  An uppercase "MPIR_VERSION" seems to work.

That gives you the version according to the .h file, but not according to the library.
 

Similar issue "unresolved external symbol __gmp_version referenced" for "gmp_version"; again "GMP_VERSION" seems to work.

"mp_bits_per_limb" too isn't working for me, and here the uppercased name doesn't work either.

Same here. Apparently it is intended that you use __gmp_bits_per_limb.

I don't know why this doesn't match the documentation. Something seems wrong somewhere.

Bill.


--
You received this message because you are subscribed to the Google Groups "mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+...@googlegroups.com.
To post to this group, send email to mpir-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Bill Hart

unread,
Dec 19, 2015, 12:40:02 AM12/19/15
to mpir-devel
What's odd is that we define these in precisely the same way as GMP does. It must be correct, but I don't see how to use them.

Bill.
Reply all
Reply to author
Forward
0 new messages