setup-msbuild icon indicating copy to clipboard operation
setup-msbuild copied to clipboard

android studio 3.0.1 encounter error

Open zsf23 opened this issue 6 years ago • 6 comments

@moli232777144 compile your mtcnn_AS project via android studio 3.0.1, encounter error as flollow: Error:error: linker command failed with exit code 1 (use -v to see invocation), how can I solvesit ?

zsf23 avatar May 14 '18 04:05 zsf23

more details?

moli232777144 avatar May 14 '18 05:05 moli232777144

Executing tasks: [clean, :app:assembleDebug]

Configuration on demand is an incubating feature. Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. Configuration 'androidTestCompile' in project ':app' is deprecated. Use 'androidTestImplementation' instead. Configuration 'testCompile' in project ':app' is deprecated. Use 'testImplementation' instead. :clean :app:externalNativeBuildCleanDebug Clean mtcnn armeabi-v7a,libncnn armeabi-v7a Cleaning... 2 files. :app:externalNativeBuildCleanRelease Clean mtcnn armeabi-v7a,libncnn armeabi-v7a Cleaning... 0 files. :app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild :app:compileDebugAidl :app:compileDebugRenderscript :app:checkDebugManifest :app:generateDebugBuildConfig :app:prepareLintJar UP-TO-DATE :app:generateDebugResValues :app:generateDebugResources :app:mergeDebugResources :app:createDebugCompatibleScreenManifests :app:processDebugManifest :app:splitsDiscoveryTaskDebug :app:processDebugResources :app:generateDebugSources :app:javaPreCompileDebug :app:compileDebugJavaWithJavac :app:generateJsonModelDebug UP-TO-DATE :app:externalNativeBuildDebug Build mtcnn armeabi-v7a [1/3] Building CXX object CMak eFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o [2/3] Building CXX ob ject CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o [3/3] Linking CX X shared library ........\build\intermediates\cmake\debug\obj\arm eabi-v7a\libmtcnn.so FAILED: cmd.exe /C "cd . && C:\Users\sfzhou\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi --gcc-toolchain=C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sysroot -fPIC -isystem C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=17 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-17/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -LC:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libmtcnn.so -o ........\build\intermediates\cmake\debug\obj\armeabi-v7a\libmtcnn.so CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a -ljnigraphics -lz -llog -latomic -lm "C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a" "C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a" "C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a" "C:/Users/sfzhou /AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libunwind.a" "-ldl" && cd ." ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Blob* std::__uninitialized_copy_a<ncnn::Blob*, ncnn::Blob*, ncnn::Blob>(ncnn::Blob*, ncnn::Blob*, ncnn::Blob*, std::allocatorncnn::Blob&) [clone .isra.107]: error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::clear(): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::clear(): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::clear(): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::~Net(): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::~Net(): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::~Net(): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::find_blob_index_by_name(char const*) const: error: undefined reference to 'std::string::compare(char const*) const' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::find_layer_index_by_name(char const*) const: error: undefined reference to 'std::string::compare(char const*) const' ../../../../src/main/jni Libs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Extractor::input(char const*, ncnn::Mat const&): error: undefined reference to 'std::string::compare(char const*) const' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Layer*, std::allocatorncnn::Layer* >::resize(unsigned int, ncnn::Layer*): error: undefined reference to 'std::__throw_length_error(char const*)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::layer_registry_entry, std::allocatorncnn::layer_registry_entry >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::layer_registry_entry*, std::vector<ncnn::layer_registry_entry, std::allocatorncnn::layer_registry_entry > >, unsigned int, ncnn::layer_registry_entry const&): error: undefined reference to 'std::__throw_length_error(char const*)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Layer*, std::allocatorncnn::Layer* >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Layer**, std::vector<ncnn::Layer*, std::allocatorncnn::Layer* > >, unsigned int, ncnn::Layer* const&): error: undefined reference to 'std::__throw_length_error(char const*)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<int, std::allocator >::_M_fill_insert(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator > >, unsigned int, int const&): error: undefined reference to 'std::__throw_length_error(char const*)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Extractor::extract(char const*, ncnn::Mat&): error: undefined reference to 'std::string::compare(char const*) const' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: un defined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::string::assign(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::string::assign(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::string::assign(std::string const&)' ../../../../src/ma in/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::resize(unsigned int, ncnn::Blob): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::string::assign(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. :app:externalNativeBuildDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:externalNativeBuildDebug'.

Build command failed. Error while executing process C:\Users\sfzhou\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {--build D:\sfzhou\github\mtcnn_ncnn-master\mtcnn_AS\app.externalNativeBuild\cmake\debug\armeabi-v7a --target mtcnn} [1/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o [2/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o [3/3] Linking CXX shared library ........\build\intermediates\cmake\debug\obj\armeabi-v7a\libmtcnn.so FAILED: cmd.exe /C "cd . && C:\Users\sfzhou\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi --gcc-toolchain=C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sysroot -fPIC -isystem C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=17 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-17/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -LC:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libmtcnn.so -o ........\build\intermediates\cmake\debug\obj\armeabi-v7a\libmtcnn.so CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a -ljnigraphics -lz -llog -latomic -lm "C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a" "C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a" "C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a" "C:/Users/sfzhou/AppData/Local/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libunwind.a" "-ldl" && cd ." ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Blob* std::__uninitialized_copy_a<ncnn::Blob*, ncnn::Blob*, ncnn::Blob>(ncnn::Blob*, ncnn::Blob*, ncnn::Blob*, std::allocatorncnn::Blob&) [clone .isra.107]: error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::clear(): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::clear(): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::clear(): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::~Net(): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::~Net(): error: undefined reference to 'std::string::_Rep::_M_destroy(std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::~Net(): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::find_blob_index_by_name(char const*) const: error: undefined reference to 'std::string::compare(char const*) const' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::find_layer_index_by_name(char const*) const: error: undefined reference to 'std::string::compare(char const*) const' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Extractor::input(char const*, ncnn::Mat const&): error: undefined reference to 'std::string::compare(char const*) const' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Layer*, std::allocatorncnn::Layer* >::resize(unsigned int, ncnn::Layer*): error: undefined reference to 'std::__throw_length_error(char const*)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::layer_registry_entry, std::allocatorncnn::layer_registry_entry >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::layer_registry_entry*, std::vector<ncnn::layer_registry_entry, std::allocatorncnn::layer_registry_entry > >, unsigned int, ncnn::layer_registry_entry const&): error: undefined reference to 'std::__throw_length_error(char const*)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Layer*, std::allocatorncnn::Layer* >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Layer**, std::vector<ncnn::Layer*, std::allocatorncnn::Layer* > >, unsigned int, ncnn::Layer* const&): error: undefined reference to 'std::__throw_length_error(char const*)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<int, std::allocator >::_M_fill_insert(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator > >, unsigned int, int const&): error: undefined reference to 'std::__throw_length_error(char const*)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Extractor::extract(char const*, ncnn::Mat&): error: undefined reference to 'std::string::compare(char const*) const' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::string::assign(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::string::assign(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::string::assign(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::_M_fill_insert(__gnu_cxx::__normal_iterator<ncnn::Blob*, std::vector<ncnn::Blob, std::allocatorncnn::Blob > >, unsigned int, ncnn::Blob const&): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function std::vector<ncnn::Blob, std::allocatorncnn::Blob >::resize(unsigned int, ncnn::Blob): error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::string::assign(std::string const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(net.cpp.o):net.cpp:function ncnn::Net::load_param(__sFILE*): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&)' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 14s

20 actionable tasks: 18 executed, 2 up-to-date

zsf23 avatar May 14 '18 07:05 zsf23

You may not have installed correct c++ environment.so links to third-party libraries to fail.

moli232777144 avatar May 14 '18 07:05 moli232777144

How Should I install C++ environments?

zsf23 avatar May 14 '18 09:05 zsf23

i have same issue , i build the libcnn.a and replace it , and then the error is fix.

wwmoo7 avatar May 17 '18 03:05 wwmoo7

I have the same problem,how to solve it?

wzc118 avatar Jun 25 '18 16:06 wzc118