使用qtcreator加androidndk编译项目时报错:

error: qrc_qml.obj: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC

error: undefined reference to '__dso_handle'

解决方案,建一个头文件,代码如下,包含到项目里:

#define NS_EXPORT

extern "C" {
/*
 * To work around http://code.google.com/p/android/issues/detail?id=23203
 * we don't link with the crt objects. In some configurations, this means
 * a lack of the __dso_handle symbol because it is defined there, and
 * depending on the android platform and ndk versions used, it may or may
 * not be defined in libc.so. In the latter case, we fail to link. Defining
 * it here as weak makes us provide the symbol when it's not provided by
 * the crt objects, making the change transparent for future NDKs that
 * would fix the original problem. On older NDKs, it is not a problem
 * either because the way __dso_handle was used was already broken (and
 * the custom linker works around it).
 */
  NS_EXPORT __attribute__((weak)) void *__dso_handle;
}

error: qrc_qml.obj: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC解决办法的更多相关文章

  1. unsupported dynamic reloc R_ARM_REL32 AND hidden symbol '__dso_handle' is not defined

    项目里编译codec src\makefiles\android\codec\Makefileline 25 原本用 4.6 不会报错-L/data/android/android-ndk/sourc ...

  2. mysql 错误 ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number 解决办法

    MySQL创建用户(包括密码)时,会提示ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number: 问题原因: ...

  3. Error:The network adaptor could not establish the connection问题的解决办法

     最近在学习hibernate 5.0.4, 自然而然就需要使用数据库,由于本人工作中一直使用Oracle,于是在自己的电脑上安装了Oracle 12.1.0, 安装完成使用一直没有问题,突然有一天使 ...

  4. Hbase出现ERROR: Can't get master address from ZooKeeper; znode data == null解决办法

    问题描述如下: hbase(main)::> list TABLE ERROR: Can't get master address from ZooKeeper; znode data == n ...

  5. "remote:error:refusing to update checked out branch:refs/heads/master"的解决办法(转)

    https://blog.csdn.net/jacolin/article/details/44014775 在使用Git Push代码到数据仓库时,提示如下错误: [remote rejected] ...

  6. VC++编译错误error C2065: “HANDLE”: 未声明的标识符及添加winbase.h后提示winbase.h(243): error C2146: 语法错误: 缺少“;”(在标识符“Internal”的前面)的解决办法

    问题描述: VC++程序编译时提示错误:error C2065: “HANDLE”: 未声明的标识符等众多错误提示,如下所示: error C2065: “HANDLE”: 未声明的标识符 error ...

  7. 《OpenGL编程指南第七版》学习——编译时提示“error C2381: “exit” : 重定义;__declspec(noreturn) 不同”错误的解决办法

    解决办法一. #if defined(_WIN32) # ifndef GLUT_BUILDING_LIBextern _CRTIMP void __cdecl exit(int); 上面是glut. ...

  8. Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/common/base/Function : Unsupported major.minor version 52.0的解决办法(图文详解)

    不多说,直接上干货! 问题详情 Exception in thread "main" java.lang.UnsupportedClassVersionError: com/goo ...

  9. error MSB6006: “CL.exe”已退出,代码为X —— 的解决办法

    错误 : error MSB6006: “CL.exe”已退出,代码为X . 解决方法: 1.有少可能是执行目录引起的. 参考 http://bbs.csdn.net/topics/370064083 ...

随机推荐

  1. 开启VMware Esxi的SSH远程登录

    1.在服务器的配置页面中开启 按[F2],输入密码,进入配置页面,选择troubleshooting options,选择EnableSSH 即可. 2.在VMware Client中开启 进入:配置 ...

  2. find查找指定类型文件并删除

            问题描述:                      查找当前目录下指定类型的文件              问题解决:                     (1)find命令   ...

  3. 【BZOJ】【1430】小猴打架

    排列组合 蛮逗的…… 这题题干描述的就一股浓浓的Kruskal的气息……很容易就想到是求一个n个点的完全图的生成树个数,然后由于有序,再乘一个n-1的排列数(n-1条边的全排列)即(n-1)! 但是我 ...

  4. uva 10626

    dp 记忆化搜索 3个1元和1个10元的情况不能少 #include <cstdio> #include <cstdlib> #include <cmath> #i ...

  5. hdu 1002 A+B

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=1002 复习一下大数 模板: #include <stdio.h> #include <s ...

  6. 解决 Ubuntu 开机 Waiting for 60 seconds more for network configuration

    sudo vim /etc/network/interfaces, 将该文件的内容修改为如下:(也就是说删掉其他的什么auto eth0.auto wlan0) auto lo iface lo in ...

  7. *[hackerrank]Volleyball Match

    https://www.hackerrank.com/contests/w1/challenges/volleyball-match 此题不错,首先可以看出是DP,S(x, y)= S(x - 1, ...

  8. Hibernate逍遥游记-第5章映射一对多-02双向(<set>、<key>、<one-to-many>、inverse、cascade="all-delete-orphan")

    1. <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hi ...

  9. 31. Next Permutation

    题目: Implement next permutation, which rearranges numbers into the lexicographically next greater per ...

  10. Retrofit所有知识场景汇总

    https://futurestud.io/blog/retrofit-getting-started-and-android-client Retrofit Series Overview Gett ...