OS X编译bochs报错 [configure: error: C compiler cannot create executables]


根据 这个链接 做安装前的配置

sh .conf.macosx 后出现以下信息
根据google到的信息,缺少command line tools,已经执行 xcode-select --install 并完成安装。

gcc版本不对? 缺乏库?


 checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking target system type... x86_64-apple-darwin13.1.0
checking if you are configuring for another platform... no
checking for standard CFLAGS on this platform... -fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/myName/Desktop/bochs-2.6':
configure: error: C compiler cannot create executables
See `config.log' for more details

不知如何提取config.log的有效信息,直接将文件挂在 这里

Linux 操作系统 gcc macosx

YYQSS 10 years, 7 months ago

试试这个:
CFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" ./configure ...
如果还是不行就试试:
CC='clang -Wno-error=unused-command-line-argument-hard-error-in-future' ./configure ...

不过话说回来,如果你要装bochs,最好用 Homebrew ,装好这个之后用 brew install bochs 就行了。

森近霖之助.. answered 10 years, 7 months ago

Your Answer