Android:错误:无法打开crtbegin_dynamic.o:没有此类文件或目录 [英] Android: error: cannot open crtbegin_dynamic.o: No such file or directory

查看:124
本文介绍了Android:错误:无法打开crtbegin_dynamic.o:没有此类文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了以下内容...

I used the following...

〜/Development/Android/android-ndk-r8c/build/tools/make-standalone-toolchain.sh --platform = android-9 --install-dir =/Users/me/toolchain

~/Development/Android/android-ndk-r8c/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=/Users/me/toolchain

然后我创建以下代码文件...

Then I create the following code file...

int main ()
{
  return 0;
}

我尝试过...

<toolchain>/arm-linux-androideabi-gcc test.c

我也尝试过

 <toolchain>/arm-linux-androideabi-gcc --sysroot=<toolchain>/sysroot test.c 

两个都回来...

 toolchain/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory

推荐答案

要使其更简单,只需设置sysroot:

To make it simpler, just set the sysroot:

<toolchain>/arm-linux-androideabi-g++ ~/test.c -o ~/test --sysroot=/home/user/android-ndk/platforms/android-9/arch-arm/

这篇关于Android:错误:无法打开crtbegin_dynamic.o:没有此类文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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