Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.12k stars 4.14k forks source link

libncnn error miss glslang? when build lib ncnn, i built glslang but still undefined reference? #3028

Open damvantai opened 3 years ago

damvantai commented 3 years ago

/usr/bin/ld: /window10/Users/tai94/Documents/baolinh/cv/LiveFaceReco_RaspberryPi_2/include/lib/libncnn.a(gpu.cpp.o): in function ncnn::destroy_gpu_instance()': gpu.cpp:(.text+0xdad): undefined reference toglslang::FinalizeProcess()' /usr/bin/ld: /window10/Users/tai94/Documents/baolinh/cv/LiveFaceReco_RaspberryPi_2/include/lib/libncnn.a(gpu.cpp.o): in function ncnn::create_gpu_instance()': gpu.cpp:(.text+0x44e9): undefined reference toglslang::InitializeProcess()' /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<unsigned int> >&)': gpu.cpp:(.text+0x88b8): undefined reference toglslang::TShader::TShader(EShLanguage)' /usr/bin/ld: gpu.cpp:(.text+0x88d3): undefined reference to glslang::TShader::setStringsWithLengths(char const* const*, int const*, int)' /usr/bin/ld: gpu.cpp:(.text+0x88f0): undefined reference toglslang::TShader::addProcesses(std::vector<std::cxx11::basic_string<char, std::char_traits, 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::TShader::setEntryPoint(char const*)' /usr/bin/ld: gpu.cpp:(.text+0x890e): undefined reference toglslang::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 to glslang::TShader::getInfoLog()' /usr/bin/ld: gpu.cpp:(.text+0x8b3e): undefined reference toglslang::TShader::getInfoDebugLog()' /usr/bin/ld: gpu.cpp:(.text+0x8b64): undefined reference to glslang::TShader::~TShader()' /usr/bin/ld: gpu.cpp:(.text+0x8c39): undefined reference toglslang::GlslangToSpv(glslang::TIntermediate const&, std::vector<unsigned int, std::allocator >&, glslang::SpvOptions)' /usr/bin/ld: gpu.cpp:(.text+0x8c44): undefined reference to glslang::TShader::~TShader()' /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 >&) [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

kunerer commented 3 years ago

你好 我碰到了同样的问题 请问您解决了吗?期待您的回复!