Open damvantai opened 3 years ago
You must compile your ncnn with glslang support cmake -DCMAKE_BUILD_TYPE=Release -DNCNN_VULKAN=ON -DNCNN_SYSTEM_GLSLANG=ON -DNCNN_BUILD_EXAMPLES=ON .. doesn't forget to clone the libncnn repository with --recursive option
git clone https://github.com/Tencent/ncnn.git --recursive
you can setup your ncnn android by cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DNCNN_VULKAN=ON -DNCNN_SHARED_LIB=ON -DNCNN_ENABLE_LTO=OFF ..
/usr/bin/ld: /window10/Users/tai94/Documents/baolinh/cv/LiveFaceReco_RaspberryPi_2/include/lib/libncnn.a(gpu.cpp.o): in function, std::allocator >, std::allocator<std:: cxx11::basic_string<char, std::char_traits, std::allocator > > > const&)'
/usr/bin/ld: gpu.cpp:(.text+0x88ff): undefined reference to >&, glslang::SpvOptions)'
/usr/bin/ld: gpu.cpp:(.text+0x8c44): undefined reference to >&) [clone .cold]':
gpu.cpp:(.text.unlikely+0x204): undefined reference to `glslang::TShader::~TShader()'
collect2: error: ld returned 1 exit status
make[2]: [CMakeFiles/LiveFaceReco.dir/build.make:152: LiveFaceReco] Error 1
make[1]: [CMakeFiles/Makefile2:85: CMakeFiles/LiveFaceReco.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
ncnn::destroy_gpu_instance()': gpu.cpp:(.text+0xdad): undefined reference to
glslang::FinalizeProcess()' /usr/bin/ld: /window10/Users/tai94/Documents/baolinh/cv/LiveFaceReco_RaspberryPi_2/include/lib/libncnn.a(gpu.cpp.o): in functionncnn::create_gpu_instance()': gpu.cpp:(.text+0x44e9): undefined reference to
glslang::InitializeProcess()' /usr/bin/ld: /window10/Users/tai94/Documents/baolinh/cv/LiveFaceReco_RaspberryPi_2/include/lib/libncnn.a(gpu.cpp.o): in functionncnn::compile_spirv_module(char const*, int, ncnn::Option const&, std::vector<unsigned int, std::allocator<unsigned int> >&)': gpu.cpp:(.text+0x88b8): undefined reference to
glslang::TShader::TShader(EShLanguage)' /usr/bin/ld: gpu.cpp:(.text+0x88d3): undefined reference toglslang::TShader::setStringsWithLengths(char const* const*, int const*, int)' /usr/bin/ld: gpu.cpp:(.text+0x88f0): undefined reference to
glslang::TShader::addProcesses(std::vector<std::cxx11::basic_string<char, std::char_traitsglslang::TShader::setEntryPoint(char const*)' /usr/bin/ld: gpu.cpp:(.text+0x890e): undefined reference to
glslang::TShader::setSourceEntryPoint(char const)' /usr/bin/ld: gpu.cpp:(.text+0x8adf): undefined reference to `glslang::TShader::parse(TBuiltInResource const, int, EProfile, bool, bool, EShMessages, glslang::TShader::Includer&)' /usr/bin/ld: gpu.cpp:(.text+0x8b1e): undefined reference toglslang::TShader::getInfoLog()' /usr/bin/ld: gpu.cpp:(.text+0x8b3e): undefined reference to
glslang::TShader::getInfoDebugLog()' /usr/bin/ld: gpu.cpp:(.text+0x8b64): undefined reference toglslang::TShader::~TShader()' /usr/bin/ld: gpu.cpp:(.text+0x8c39): undefined reference to
glslang::GlslangToSpv(glslang::TIntermediate const&, std::vector<unsigned int, std::allocatorglslang::TShader::~TShader()' /usr/bin/ld: /window10/Users/tai94/Documents/baolinh/cv/LiveFaceReco_RaspberryPi_2/include/lib/libncnn.a(gpu.cpp.o): in function
ncnn::compile_spirv_module(char const, int, ncnn::Option const&, std::vector<unsigned int, std::allocator