我已經下載了CPP單元測試框架並嘗試編譯Android。但是,面對配置問題。我試圖使Standalone tool chain也試過配置,但其始終未能configure:error:配置Android時,C編譯器無法創建可執行文件
sh-4.1$ ./configure CXX=arm-linux-androideabi-g++ CC=arm-linux-androideabi-gcc CPP=arm-linux-androideabi-g++ CXXCPP=arm-linux-androideabi-g++
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... arm-linux-androideabi-gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
sh-4.1$ arm-linux-androideabi-g++
arm-linux-androideabi-g++.exe: fatal error: no input files
compilation terminated.
sh-4.1$
我的編譯環境是NDKr8,Cygwin的,Windows7的-64。
我試圖通過的config.log去,並發現該錯誤是
arm-linux-androideabi-gcc.exe: error: CreateProcess: No such file or directory
我嘗試了通過減少路徑長度等固定上述錯誤。但仍然無法解決。請讓我知道是否有人解決了類似的問題。
只是添加鏈接信息http://curl.haxx.se/mail/lib-2012-08/0184.html 但面臨與Cygwin出問題相同的問題。
D:\Test>arm-linux-androideabi-gcc Main.c
arm-linux-androideabi-gcc: error: CreateProcess: No such file or directory
D:\Test>
即使在windows提示符下你也是如此觀察者,它也是同樣的問題。
-----編輯----- 1我 配置試圖在Ubuntu 12.04操作系統與下面的線
./configure --host=arm CXX=arm-linux-androideabi-g++ CC=arm-linux-androideabi-gcc CPP=arm-linux-androideabi-g++ CXXCPP=arm-linux-androideabi-g++
但是,讓這些錯誤
大部分checking how to run the C preprocessor... arm-linux-androideabi-g++
configure: error: in `/mnt/hgfs/VMShare/gperftools-2.0_Android/gperftools-2.0':
configure: error: C preprocessor "arm-linux-androideabi-g++" fails sanity check
See `config.log' for more details.
但ARM android Gcc編譯器的時代正在失敗。
configure:4216: arm-linux-androideabi-gcc -qversion >&5
arm-linux-androideabi-gcc: error: unrecognized option '-qversion'
arm-linux-androideabi-gcc: fatal error: no input files
「詳情參見 '的config.log'」。這是您應該查看的日誌文件。 – Mat
@Mat:我只看到config.log文件。這是一個錯字:)。謝謝,我現在改爲Config.log在上面的味精中。 – Suman
從技術上講,** ./configure **腳本是正確的:您的交叉編譯器無法創建可在Windows(或桌面Linux)上運行的可執行文件。有時,** ./configure **可以被_configured_理解,您正在使用交叉編譯器,並且不打算在執行構建的相同環境中啓動二進制文件。但我不確定單元測試框架可以用於這種情況。要分析特定情況,如果您發佈要嘗試構建的項目(URL,版本等將會有所幫助),這可能很有用。 –