编译、GMP、Ocaml的错误消息

编译、GMP、Ocaml的错误消息,ocaml,gmp,Ocaml,Gmp,我正在安装库,在make之后收到一条错误消息: gcc -Wcast-qual -Wswitch -Werror-implicit-function-declaration -Wall -Wextra -Wundef -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wno-unused -std=c99 -U__STRICT_ANSI__ -g -O0 -UNDEBUG -I../mlgmpidl -I../apron -I/usr/

我正在安装库,在
make
之后收到一条错误消息:

gcc -Wcast-qual -Wswitch -Werror-implicit-function-declaration -Wall -Wextra -Wundef -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wno-unused -std=c99  -U__STRICT_ANSI__ -g -O0 -UNDEBUG -I../mlgmpidl -I../apron -I/usr/include -I/usr/local/include -I/usr/lib/ocaml -I/usr/local/lib/ocaml -c -o scalar_caml_debug.o scalar_caml.c
In file included from scalar_caml.c:23:0:
../mlgmpidl/gmp_caml.h: In function ‘camlidl_mpfr_rnd_t_c2ml’:
../mlgmpidl/gmp_caml.h:49:3: error: ‘GMP_RND_MAX’ undeclared (first use in this function)
../mlgmpidl/gmp_caml.h:49:3: note: each undeclared identifier is reported only once for each function it appears in
../mlgmpidl/gmp_caml.h: In function ‘camlidl_mpfr_rnd_t_ml2c’:
../mlgmpidl/gmp_caml.h:52:24: error: ‘GMP_RND_MAX’ undeclared (first use in this function)
make[1]: *** [scalar_caml_debug.o] Error 1
有人知道发生了什么吗?可能与GMP版本有关,有人知道如何检查吗?多谢各位

Edit1:
ldconfig-p | grep gmp
返回

libgmpxx.so.4 (libc6) => /usr/lib/libgmpxx.so.4
libgmpxx.so (libc6) => /usr/lib/libgmpxx.so
libgmp.so.3 (libc6) => /usr/lib/libgmp.so.3
libgmp.so (libc6) => /usr/lib/libgmp.so
/usr/local/include/
包含:
gmp.h mpf2mpfr.h mpfr.h
/usr/local/lib/
包含
alt ergo libgmp.a libgmp.so libgmp.so.10.0.2 libmpfr.la libmpfr.so.4 ocaml python2.7
coq libgmp.la libgmp.so.10 libmpfr.a libmpfr.so.4.0.1 python2.6 site_ruby


有人能告诉我我的机器上安装了哪个版本的GMP吗?

您的libgmp dev版本可能比您正在使用的mlgmpidl版本旧,这就解释了mlgmpidl要求未定义的东西。

ldconfig-p
可以用来确定库的版本——我假设您在Linux上。我不确定OSX中的同义词是什么,但我肯定现在有OSX和linux的同义词指南,因为您知道了一个可能的命令。@nlucaroni,谢谢您的帮助。。。我正在使用Linux,我已经编辑了我的初始帖子,你能帮我吗?你从哪里得到的
mlgmpidl
?那是什么版本?从我在网上找到的源代码中,我没有在
GMP\u caml.h
中看到任何关于
GMP\u RND\u MAX的内容。实际上我没有下载正确版本的
mlgmpidl
。。。