AOSP建立在OS X 10.7.5失败: 'dprintf' 未声明
问题描述:
我想建立AOSP对OS X 10.7.5,在Xcode 4.2.1和我得到的错误:AOSP建立在OS X 10.7.5失败: 'dprintf' 未声明
host C++: libutils <= system/core/libutils/Printer.cpp
system/core/libutils/Printer.cpp: In member function ‘virtual void android::FdPrinter::printLine(const char*)’:
system/core/libutils/Printer.cpp:123: error: ‘dprintf’ was not declared in this scope
make: * [out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.o] Error 1
但是,如果我自己使用函数dprintf编写程序,它编译得很好,所以我猜 我的问题是,AOSP编译使用错误的编译器/工具链。 我想看看我有我的机器上的C编译器,我得到这个:
$ whereis gcc
/usr/bin/gcc
$ ls -al /usr/bin/gcc
lrwxr-xr-x 1 root wheel 12 Dec 16 23:08 /usr/bin/gcc -> llvm-gcc-4.2
我读了LLVM不支载的AOSP。这可能是原因吗?如果是这种情况,我如何安装另一个编译器?
答
我解决了升级到OS X 10.9(Mavericks)和XCode的问题。
尝试先更新Xcode,如果不想升级到Mavericks。 – Kislingk