It appears that aidl uses some functions without first including the
headers where those functions are declared. It works on many systems
where those headers end up being included indirectly, but obviously
not on all of them.

You can make a local fix by including stdio.h, stdlib.h and string.h
at the top of the few files that fail to compile.

JBQ

2008/12/20 tony <[email protected]>:
> ~/cupcake$ make
> build/core/product_config.mk:207: WARNING: adding test OTA key
> ============================================
> TARGET_PRODUCT=generic
> TARGET_BUILD_VARIANT=eng
> TARGET_SIMULATOR=
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> HOST_ARCH=x86
> HOST_OS=linux
> HOST_BUILD_TYPE=release
> BUILD_ID=
> ============================================
> build/core/main.mk:178: implicitly installing apns-conf_sdk.xml
> host C++: aidl <= frameworks/base/tools/aidl/aidl.cpp
> frameworks/base/tools/aidl/aidl.cpp: In function 'void test_document
> (document_item_type*)':
> frameworks/base/tools/aidl/aidl.cpp:56: 警告: 格式'%08x'需要类型'unsigned int',
> 但实参 2 的类型为'long int'
> frameworks/base/tools/aidl/aidl.cpp:56: 警告: 格式'%ld'需要类型'long int',但实参
> 3 的类型为'unsigned int'
> frameworks/base/tools/aidl/aidl.cpp: In function 'int convert_direction
> (const char*)':
> frameworks/base/tools/aidl/aidl.cpp:69: 错误: 'strcmp'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp:72: 错误: 'strcmp'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp: In function 'void
> main_import_parsed(buffer_type*)':
> frameworks/base/tools/aidl/aidl.cpp:100: 错误: 'malloc'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp:101: 错误: 'memset'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp:102: 错误: 'strdup'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp: In function 'char*
> parse_import_statement(const char*)':
> frameworks/base/tools/aidl/aidl.cpp:137: 错误: 'malloc'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp:138: 错误: 'memcpy'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp: In function 'int check_filename
> (const char*, const char*, buffer_type*)':
> frameworks/base/tools/aidl/aidl.cpp:194: 错误: 'strchr'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp:195: 错误: 'strlen'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp: In function 'char* rfind(char*,
> char)':
> frameworks/base/tools/aidl/aidl.cpp:275: 错误: 'strlen'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp: In function 'bool matches_keyword
> (const char*)':
> frameworks/base/tools/aidl/aidl.cpp:373: 错误: 'strcmp'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp: In function 'int
> parse_preprocessed_file(const std::string&)':
> frameworks/base/tools/aidl/aidl.cpp:629: 错误: 'strncmp'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp:650: 错误: 'strcmp'在此作用域中尚未声明
> frameworks/base/tools/aidl/aidl.cpp:652: 错误: 'malloc'在此作用域中尚未声明
>
> >
>



-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to