升压号楼为Android错误"找不到-lrt" [英] Building Boost for Android with error "cannot find -lrt"

查看:566
本文介绍了升压号楼为Android错误"找不到-lrt"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图建立提升1.55为Android,但我正在逐渐为连接和Boost.System错误Boost.Atomic,即说:错误:无法找到-lrt。当然,Android不具备librt因为它的内置到C运行时。所以,我想获得提升,所以它不会链接到librt。我尝试了删除源$ C ​​$ C每一个-lrt

So I am trying to build boost 1.55 for android, but I am getting linking errors for Boost.System and Boost.Atomic, that say "error: cannot find -lrt". Of course, android doesn't have librt because its built into the C runtime. So, I am trying to get boost so it won't link to librt. I tried just deleting every "-lrt" in the source code:

find . -type f | xargs -n1 -P 8 sed -i "s/-lrt//g"

但我仍然得到同样的错误。我如何提升并不反对librt链接为Android?

But I still get the same error. How do I make boost not link against librt for android?

推荐答案

确实 -lrt 所有occurrencies与SED似乎并没有对这个问题产生任何影响。

什么工作对我来说(在升压1.53.0虽然)如下:

Indeed all occurrencies of -lrt with sed doesn't seem to have any impact on the problem.
What worked for me (in boost 1.53.0 though) is the following:


  • 编辑工具/建设/ V2 /工具/ gcc.jam

  • 注释库= RT; 在这个code节(顺便说一句,这可能是因为你没有在 -pthread 选项线):

  • Edit tools/build/v2/tools/gcc.jam
  • Comment libs = rt ; in this code section (By the way, it could be that you do not have the -pthread option line):

    case * :
    {
        option = -pthread ;
        libs = rt ;   <--Comment this line
    }


请注意:由于初始/蛮力的解决方案,我想借此失败的命令并手动运行它们删除 -lrt 从中

Note: As initial/brute force solution, I would take the failed commands and manually run them removing -lrt from them.

这篇关于升压号楼为Android错误&QUOT;找不到-lrt&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆