NDK 编译报错:request for member 'FindClass' in something not a structure or union
ndk编译 xx.c文件时一直报下面的错误:
”request for member 'FindClass' in something not a structure or union ...”
原因是源码是 .c 文件 而c文件中 使用env 需要 使用“(*env)->”
而我在别的地方拷贝的代码里使用的是 c++ 形式的 用法:“env->”
解决方法 把.c 文件 改成.cpp 文件。
-------------------------------------------------------------------------------------------------------------------------------
在linux下如果.c文件中用 “env->” 编译会找不到此结构,必须用“(*env)->”,或者改成.cpp文件,以 c++的方式来编译
http://bbs.csdn.net/topics/360018420/
NDK 编译报错:request for member 'FindClass' in something not a structure or union的更多相关文章
- Spark程序编译报错error: object apache is not a member of package org
Spark程序编译报错: [INFO] Compiling 2 source files to E:\Develop\IDEAWorkspace\spark\target\classes at 156 ...
- RK3399 Android 7.1 删除repo后编译报错
CPU:RK3399 系统:Android 7.1 瑞芯微使用的是 repo 来进行代码管理,但我们需要用 git 来管理,所以就删除了 repo,但是编译就报错,如下:Server is alrea ...
- ios 12 xcode10 新升级的编译报错libstdc++.6.0.9 Multiple commands produce
问题一 编译报错 Showing Recent Messages :-1: Multiple commands produce '/Users/duning/Library/Developer/Xco ...
- 使用C#模拟Outlook发送邮件,代码编译报错
添加OutLook API using OutLook = Microsoft.Office.Interop.Outlook; 发送邮件方法 public void SendEmail() { Out ...
- cordova编译报错:Execution failed for task ':processDebugResources'
cordova编译报错:Execution failed for task ':processDebugResources' 引发这个错误的最扩祸首就是一个中文命名的文件,不知道什么时候加入的,我写了 ...
- 编译报错dereferencing pointer to incomplete type
关于编译报错“dereferencing pointer to incomplete type... 多是没找到结构体的定义,可以在本地复制其定义试试. 参考: http://my.oschina.n ...
- Maven-010-maven 编译报错:Failure to ... in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced.
今晚在编译 maven 项目的时候,命令行报错,出现 Failure to ... in ... 类似错误,详细的错误信息如下所示: [INFO] -------------------------- ...
- [Intellij] 编译报错 javacTask
报错信息: Idea 编译报错 javacTask: 源发行版 1.6 需要目标发行版 1.6 解决方案:
- jenkis编译报错:需要class,interface或enum
现象: 1.jenkis编译报错:需要class,interface或enum 2.使用ant进行编译ok. 解决方法: 1. Jenkis重新编译一个以前成功的svn版本,直至编译成功. 2.Jen ...
随机推荐
- Centos Crontab查看状态和开启
# service crond status crond is stopped # service crond start Starting crond # service crond status ...
- Struts2学习(2)
1.结果嗯配置 (1)全局结果页面 (2)局部结果页面 (3)result标签type属性 2.在action获取表单提交数据 (1)使用ActionContext类获取 (2)使用ServletAc ...
- 查看后台PHP进程(非PHP-FPM)
ps -ef | grep php | grep -v php-fpm
- tableau join 与格式问题
一开始我没有找到它的join 方法.其实应该是编辑相应的join关系.选择数据源,选择字段.数据源是可以选择的. 剩下的计算问题,要再弄下.不好说,这个其实烦了我很久了. 高级选项,扩展最大行数.即可 ...
- 2017.11.27 stm8 low power-consumption debugging
1 STM8L+LCD The STM8L-DISCOVERY helps you to discover the STM8L ultralow power features and todevelo ...
- 使用NSUserDefaults保存自定义对象(转)
转自http://zani.iteye.com/blog/1431239 .h文件 #import <Foundation/Foundation.h> @interface MyObjec ...
- loj#6566. 月之都的密码
搜交互题搜到的... 竟然还有这么水的交互题,赶紧过了再说 交互库里有一个 $[1,n]$ 到 $[1,n]$ 的双射 你可以调用 $encode(k,a[])$ 询问左边的一个大小为 $k$ 的集合 ...
- CodeForces - 682E: Alyona and Triangles(旋转卡壳求最大三角形)
You are given n points with integer coordinates on the plane. Points are given in a way such that th ...
- 一文搞定 Git 相关概念和常用指令
我几乎每天都使用 Git,但仍然无法记住很多命令. 通常,只需要记住下图中的 6 个命令就足以供日常使用.但是,为了确保使用地很顺滑,其实你应该记住 60 到 100 个命令. Git 相关术语 Gi ...
- js易犯错误与易混淆的重要知识点
一:作用域的问题 简单案例1: var a = 1; var n = function () { console.log(a); var a=2; } n(); =>输出undefined原因: ...