我使用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'
会遗漏什么?