1
我安装一个图书馆,并得到了make
后的错误消息:编译,GMP的错误消息,ocaml的
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 libmpfr.so.4.0.1 python2.6 site_ruby
谁能告诉我这GMP的版本已经安装在我的机器上?
'LDCONFIG -p'可以用来确定 - 我我假设你在Linux上的库的版本。我不确定在OSX等价的,但我敢肯定有同义词导游那里为OSX和Linux现在你知道一个可能的命令。 – nlucaroni
@nlucaroni,感谢您的帮助...我使用Linux,我编辑了我最初的帖子,请你帮忙吗? – SoftTimur
你从哪里得到'mlgmpidl'?那是什么版本?我在线上找到的源代码中看不到'gmp_caml.h'中的'GMP_RND_MAX'。 – nlucaroni