android NDK jni下的c文件 Unresolved inclusion
来源:互联网 发布:cmseasy 知乎 编辑:程序博客网 时间:2024/06/09 17:40
android NDK jni下的c文件 Unresolved inclusion
最近在NDK下面移植一个C++的项目,遇到很多系统头文件找不到的问题,一直在纠结自己环境变量配错了,cygwin的环境变量配了cygwin/bin,c_include ,c++_include 等一堆乱起八糟的东西都没有搞定,其实与cygwin下的环境没有什么关系,不过有一个要注意,映射window下的路径到cygwin .
设置里面c/c++增加:windows/preference c/c++ /Debug /Source Lookup Path /add 选择Path map , \cygdrive\c -------c:\ 的映射
还有一种错误时NDK内部的头文件找不到,例如<jni.h>,原因是在eclipse编辑环境中没有找到对应的include中的文件。解决方法是将包含该文件的include目录作为新的linked folder加入工程中。具体方法如下:
1. 右击工程->New->Folder
2. 对话框中点击Advanced
1. 右击工程->New->Folder
2. 对话框中点击Advanced
3. 选择Link to alternate location (Linked Folder),选择需要的include目录
4. Finish后刷新工程,问题解决。
include 目录可以在ndk的安装目录中找到
例如:/android-ndk-r9b/platforms/android-18/arch-arm/usr/include
这样就能完美解决了,这些问题困扰了我一周的时间,都在纠结这个问题,现在记录下来。
基本上把c++d的工程直接搬到android中的jni中,都会遇到这个错误。注意2点,一是include NDK的环境,二是cygwin的环境变量。
现在已经全部解决,神清气爽,马上就要去大美利坚了,赞一个!!!
1 0
- android NDK jni下的c文件 Unresolved inclusion
- android NDK jni下的c文件 Unresolved inclusion
- android NDK jni下的c文件Unresolved inclusion
- android NDK jni下的c文件 Unresolved inclusion
- android NDK jni下的c文件 Unresolved inclusion
- android NDK jni下的c文件 Unresolved inclusion
- android NDK jni下的c文件 Unresolved inclusion
- android NDK jni下的c文件 Unresolved inclusion
- android NDK jni下的c文件 Unresolved inclusion:<jni.h>
- Android ndk“Unresolved inclusion: <jni.h>”
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- 【android】NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android ndk 项目导入时出现的问题:Unresolved inclusion: <jni.h>
- Eclipse NDK 开发Unresolved inclusion:<jni.h>
- C++模板机制笔记
- auto_ptr解析
- POJ_2418_Hardwood Species(map实现、Trie tree实现)
- QT中QWidget、QDialog及QMainWindow的区别
- delphi中获得当前时间
- android NDK jni下的c文件 Unresolved inclusion
- java代理模式 (转)
- java中的输入输出(转载)
- C# checked与unchecked用法
- 回溯与递归
- C# TextBox中的Validating与Validated事件
- C# string学习(转载)
- C# 中virtual,override,new 的区别与用法(转载)
- Jquery好友选择器