clang++: error: linker command failed with exit code 1 (use -v to see invocation). I use ndk version 21.0.6113669

  android, android-ndk, c++, cmake

I use a Cmake version(3.10.2.4988404)

when I Run an App it shows this error

FAILED: ../../../../build/intermediates/cmake/debug/obj/arm64-v8a/libals-lib.so
cmd.exe /C "cd . && C:UsersAnandAppDataLocalAndroidSdkndk.0.6113669toolchainsllvmprebuiltwindows-x86_64binclang++.exe –target=aarch64-none-linux-android21 –gcc-toolchain=C:/Users/Anand/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64 –sysroot=C:/Users/Anand/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++11 -stdlib=libc++ -frtti -fexceptions -O0 -fno-limit-debug-info -Wl,–exclude-libs,libgcc_real.a -Wl,–exclude-libs,libatomic.a -Wl,–build-id -Wl,–fatal-warnings -Wl,–no-undefined -Qunused-arguments -shared -Wl,-soname,libals-lib.so -o ……..buildintermediatescmakedebugobjarm64-v8alibals-lib.so CMakeFiles/als-lib.dir/src/main/cpp/ExtractLSTMFeats.cpp.o CMakeFiles/als-lib.dir/src/main/cpp/als-predict.cpp.o CMakeFiles/als-lib.dir/src/main/cpp/compute-mfcc-feats.cpp.o CMakeFiles/als-lib.dir/src/main/cpp/ExtractSVMFeats.cpp.o CMakeFiles/als-lib.dir/src/main/cpp/feat-util.cpp.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/base/io-funcs.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/base/kaldi-error.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/base/kaldi-math.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/base/kaldi-utils.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/base/timer.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/feat/feature-functions.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/feat/feature-mfcc.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/feat/feature-window.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/feat/mel-computations.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/feat/resample.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/feat/wave-reader.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/compressed-matrix.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/kaldi-matrix.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/kaldi-vector.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/matrix-functions.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/optimization.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/packed-matrix.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/qr.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/sp-matrix.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/sparse-matrix.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/srfft.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/matrix/tp-matrix.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/transform/cmvn.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/util/kaldi-holder.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/util/kaldi-io.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/util/kaldi-semaphore.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/util/kaldi-table.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/util/parse-options.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/util/simple-io-funcs.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/util/text-utils.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/ivector/voice-activity-detection.cc.o CMakeFiles/als-lib.dir/src/main/cpp/kaldi/ivectorbin/compute-vad.cc.o CMakeFiles/als-lib.dir/src/main/cpp/libsvm/svm-predict.c.o CMakeFiles/als-lib.dir/src/main/cpp/libsvm/svm.cpp.o CMakeFiles/als-lib.dir/src/main/cpp/findpeaks.cpp.o CMakeFiles/als-lib.dir/src/main/cpp/SRScore.cpp.o -llog ../../../../src/main/cpp/libs/arm64-v8a/libclapack.a ../../../../src/main/cpp/libs/arm64-v8a/liblapack.a ../../../../src/main/cpp/libs/arm64-v8a/libblas.a ../../../../src/main/cpp/libs/arm64-v8a/libf2c.a ../../../../src/main/cpp/libs/arm64-v8a/libopenblas.a -latomic -lm && cd ."
C:/Users/Anand/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/binld:../../../../src/main/cpp/libs/arm64-v8a/liblapack.a: file format not recognized; treating as linker script
C:/Users/Anand/AppData/Local/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/binld:../../../../src/main/cpp/libs/arm64-v8a/liblapack.a:1: syntax error
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

when I clean a project is shows
CreateProcess error=2, The system cannot find the file specified

Source: Windows Questions C++

LEAVE A COMMENT