简体   繁体   English

NDK r16b独立工具链错误:“ / usr / bin / ld:此链接器未配置为使用sysroots”

[英]NDK r16b standalone toolchain error: “/usr/bin/ld: this linker was not configured to use sysroots”

I'm trying to build an app using Android NDK. 我正在尝试使用Android NDK构建应用程序。 The compile went successfully but in the linking step it fails with error as below: 编译成功,但在链接步骤中失败,并显示以下错误:

1> /usr/bin/ld: this linker was not configured to use sysroots
clang50++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

I'm using 我正在使用

--sysroot=<MyNDKPath>/sysroot 

And

-isystem <MyNDKPath>/sysroot/usr/include/arm-linux-androideabi 

when compiling 编译时

Can anyone help me on resolving this ? 谁能帮助我解决这个问题?

For me it was a missing path to ld. 对我而言,这是通往ld的缺失之路。 I added it to the PATH environment variable inside Eclipse and it worked: 我将其添加到Eclipse内的PATH环境变量中,并且可以正常工作:

${ANDROID_NDK}\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NDK中缺少/ usr / include(r16b) - /usr/include missing from NDK (r16b) FFMPEG源代码编译因Android NDK Clang编译器(r16b)而失败,并出现错误“ clang编译器不支持&#39;-mcpu = arm&#39;” - FFMPEG source compilation failed with Android NDK Clang compiler (r16b) with error “the clang compiler does not support '-mcpu=arm'” NDK r16b std :: istringstream的行为不符合预期 - NDK r16b std::istringstream doesn't behave as expected 使用NDK r16b为64位Android构建OpenSSL 1.0.2n对bsd_signal的未定义引用 - Building OpenSSL 1.0.2n for 64-bit Android with NDK r16b undefined reference to bsd_signal 交叉编译时NDK工具链中的/ system / bin / linker在哪里 - Where is /system/bin/linker from NDK toolchain when cross compiling 使用Cygwin构建android-ndk-r17c独立工具链 - Building an android-ndk-r17c standalone toolchain with Cygwin 无法摆脱错误“/ usr / bin / ld:找不到-lncurses” - cannot get rid of error “/usr/bin/ld: cannot find -lncurses” NDK12b:clang和gcc使用独立工具链和相同的构建脚本生成的不同ELF - NDK12b: Different ELF produced by clang vs gcc using the standalone toolchain and the same build scripts ndk r20 ld:ld:错误:找不到-lpthread - ndk r20 ld : ld: error: cannot find -lpthread Android NDK为ARM构建独立工具链 - Android ndk building standalone toolchain for ARM
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM