2011-09-19 92 views
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的版本已經安裝在我的機器上?

+0

'LDCONFIG -p'可以用來確定 - 我我假設你在Linux上的庫的版本。我不確定在OSX等價的,但我敢肯定有同義詞導遊那裏爲OSX和Linux現在你知道一個可能的命令。 – nlucaroni

+0

@nlucaroni,感謝您的幫助...我使用Linux,我編輯了我最初的帖子,請你幫忙嗎? – SoftTimur

+1

你從哪裏得到'mlgmpidl'?那是什麼版本?我在線上找到的源代碼中看不到'gmp_caml.h'中的'GMP_RND_MAX'。 – nlucaroni

回答

2

你libgmp-dev的版本可能比版本mlgmpidl您正在使用的,這說明了mlgmpidl詢問未定義的東西老。