ocaml - 编译、GMP、Ocaml的错误信息

标签 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/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版本有关,有谁知道怎么查吗?非常感谢

编辑1: 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 libmpfr.so.4.0.1 python2.6 site_ruby

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

最佳答案

您的 libgmp-dev 版本可能比您正在使用的 mlgmpidl 版本旧,这说明 mlgmpidl 要求未定义的内容。

关于ocaml - 编译、GMP、Ocaml的错误信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7469402/

相关文章:

c++ - GMP(GNU 多精度): "mpz_mod" function error

python - GMPY2(或 GMP)是否具有 pow() 函数?

functional-programming - 如何在 OCaml 中将字典实现为函数?

ocaml - 代码注释中的预处理错误

ocaml - 从 ocaml 中的循环/可变列表中删除循环?

c++ - 打印不带指数的 gmplib 的 mpf_t 数

c - 如何跟踪或调试GMP?

build - 在 OPAM 构建中检测目标架构

ocaml - 如何在沙丘中禁用错误​​(警告 66): unused open!

python - gmpy2 有 "e=2.1718..."常量吗?