0
我是C的新手。我想在JavaScript中做一些矩陣處理,並且想要將C庫嵌入爲Node JS模塊。我完成了一個概念驗證模塊,可以做到這一點,並且工作正常。在Ubuntu上配置Meschach的問題16.10 x64
我從here (mesch12b.tar.gz)下載了Meschach做矩陣操縱。它看起來像是我需要的一個很好的選擇(儘管我對C或C++中的其他選項開放)。
出於某種原因,當我運行該腳本./configure
,它無法找到任何東西:
$ ./configure
loading cache ./config.cache
checking for acc... no
checking for cc... (cached) no
checking for gcc... (cached) no
checking for cc... (cached) no
configure: error: no acceptable cc found in $PATH
我的道路似乎罰款和cc
和gcc
可我的系統上(我已經永遠地安裝build-essential
):
$ which cc
/usr/bin/cc
$ which gcc
/usr/bin/gcc
我看了很多所以但沒有找到任何幫助。有小費嗎?
UPDATE
我發現,如果我設置CC
環境變量,我們得到解決的第一個問題,但更多的是引起。我會盡量逐個解決它們,但如果任何人都可以指出我做錯的一些重要事情,我會很感激。
$ CC=/usr/bin/gcc ./configure
loading cache ./config.cache
checking for acc... /usr/bin/gcc
checking for cc... (cached) /usr/bin/gcc
checking for gcc... (cached) /usr/bin/gcc
checking whether the C compiler (/usr/bin/gcc ) works... yes
checking whether the C compiler (/usr/bin/gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether /usr/bin/gcc accepts -g... yes
checking how to run the C preprocessor... /usr/bin/gcc -E
checking for AIX... no
./configure: 957: ./configure: AC_HPUX: not found
checking for minix/config.h... no
checking for POSIXized ISC... no
checking for ranlib... ranlib
checking for memory.h... yes
checking for ANSI C header files... yes
checking for complex.h... yes
checking for malloc.h... yes
checking for varargs.h... no
checking for size_t... yes
checking for working const... yes
checking whether byte ordering is bigendian... no
computing machine epsilon(s)
/usr/bin/gcc -o macheps dmacheps.c
dmacheps.c:37:1: warning: return type defaults to 'int' [-Wimplicit-int]
main()
^
/usr/bin/gcc -o macheps fmacheps.c
fmacheps.c:37:1: warning: return type defaults to 'int' [-Wimplicit-int]
main()
^
computing M_MAX_INT
/usr/bin/gcc -o maxint maxint.c
maxint.c:27:1: warning: return type defaults to 'int' [-Wimplicit-int]
main()
^
maxint.c: In function 'main':
maxint.c:37:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
printf("%d\n", old_i);
^
maxint.c:37:5: warning: incompatible implicit declaration of built-in function 'printf'
maxint.c:37:5: note: include '<stdio.h>' or provide a declaration of 'printf'
checking char \0 vs. float zeros
checking for bcopy... yes
checking for bzero... yes
./configure: 1697: ./configure: Syntax error: "(" unexpected (expecting "fi")
你是否也需要Abednego和Shadrach? –
刪除'config.cache';它記錄你沒有C編譯器,即使你最近安裝了一個。然後重新運行配置腳本。 –
@JonathanLeffler我做到了這一點,但無濟於事。 –