我已经尝试使用 JNI 的 HelloWorld 应用程序,它工作正常。然后我修改它有一个头文件: custom_header.h 的内容是
#include<time.h>
struct my_struct
{
struct timeval tmvl;
};
HelloJNI.c 的内容是
#include "include/custom_header.h"
<<other code>>
当我在 /home/sattu/workspace_jni/AndroidHelloJNI/jni 目录中执行“ndk-build”时出现以下错误
In file included from /home/sattu/workspace_jni/AndroidHelloJNI/jni/include/custom_header.h:1:0,
from /home/sattu/workspace_jni/AndroidHelloJNI/jni/HelloJNI.c:4:
/home/sattu/android-ndk-r9c/platforms/android-15/arch-arm/usr/include/linux/time.h:20:2: error: unknown type name 'time_t'
/home/sattu/android-ndk-r9c/platforms/android-15/arch-arm/usr/include/linux/time.h:26:2: error: unknown type name 'time_t'
/home/sattu/android-ndk-r9c/platforms/android-15/arch-arm/usr/include/linux/time.h:27:2: error: unknown type name 'suseconds_t'
会错过什么?