为安卓构建带有错误"cannot find -lrt"的加速
Building Boost for Android with error "cannot find -lrt"
所以我正在尝试为 android 构建 boost 1.55,但我遇到了 Boost.System 和 Boost.Atomic 的链接错误,上面写着"错误:找不到 -lrt"。当然,android 没有 librt,因为它内置在 C 运行时中。所以,我正在尝试获得提升,这样它就不会链接到 librt。我尝试删除源代码中的每个"-lrt":
find . -type f | xargs -n1 -P 8 sed -i "s/-lrt//g"
但我仍然收到同样的错误。如何使提升不链接到安卓版的librt?
事实上,
所有带有 sed 的 -lrt
occurrency 似乎对这个问题没有任何影响。
对我有用的(虽然在 boost 1.53.0 中)如下:
- 编辑
tools/build/v2/tools/gcc.jam
此代码部分中的注释
libs = rt ;
(顺便说一下,可能是您没有-pthread
选项行):case * : { option = -pthread ; libs = rt ; <--Comment this line }
注意:作为初始/蛮力解决方案,我将采用失败的命令并手动运行它们,并从中删除-lrt
。
相关文章:
- /usr/bin/ld: cannot find -lc++
- Cannot find -lglad
- "Cannot find -l<directory>"错误 - CMake
- Windows cannot find MinGW
- cannot find -lMagick++-6.Q16
- 如何解决"cannot find -lidn ,-l***"?
- cannot find boost_process cmake find_package
- /usr/bin/ld: cannot find -lGQt
- c++ SDL2 - ld||cannot find -lmingw32|
- /usr/bin/ld: cannot find -lcaffe
- 生成错误:"cannot find target for file"和"undefined reference"
- libreoffice cannot find -lstdc++
- GetPrivateProfileStringA 返回"The system cannot find the file specified."即使文件存在
- mingw-w64 ... ld.exe: cannot find -lboost_filesystem
- 构建 vcxproj 文件给我一个无信息的错误"The system cannot find the path specified"
- Sysgcc: ld.exe cannot find -lcurl -ljsoncpp
- CMake/Make cannot find libusb
- 如何修复Visual Studio 2017中的"Cannot find or open the PDB file."
- C++ cannot find SQLite3
- C++ 错误:"cannot find bounds of current function"