HaoQChen / iflytek_awaken_asr

use iflytek's technology to realize awaken and order recognition
71 stars 15 forks source link

换成自己的libmsc.so 后编译报错 用您的so文件 能编译成功 但是报error code:25107 我下载的官方demo可以编译成功 #2

Open yubinbin opened 5 years ago

yubinbin commented 5 years ago

gcc -c -g -Wall -I./include src/awaken.c -o src/awaken.o gcc -g -Wall -I./include src/asr_record.o src/linuxrec.o src/play_audio.o src/speech_recognizer.o src/main.o src/awaken.o -o bin/awaken_asr -L./libs/x64 -lmsc -lrt -ldl -lpthread -lasound ./libs/x64/libmsc.so:对‘typeinfo for std::bad_cast’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ostringstream<char, std::char_traits, std::allocator >::~basic_ostringstream()’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringbuf<char, std::char_traits, std::allocator >::pbackfail(int)’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for std::basic_stringstream<char, std::char_traits, std::allocator >’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_free_exception’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringbuf<char, std::char_traits, std::allocator >::str() const’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringbuf<char, std::char_traits, std::allocator >::underflow()’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_begin_catch’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringbuf<char, std::char_traits, std::allocator >::overflow(int)’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::_Rep::_M_destroy(std::allocator const&)’未定义的引用 ./libs/x64/libmsc.so:对‘std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base, std::_Rb_tree_node_base&)’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for std::basic_ostringstream<char, std::char_traits, std::allocator >’未定义的引用 ./libs/x64/libmsc.so:对‘std::bad_cast::~bad_cast()’未定义的引用 ./libs/x64/libmsc.so:对‘operator delete[](void)’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::reserve(unsigned long)’未定义的引用 ./libs/x64/libmsc.so:对‘typeinfo for std::basic_streambuf<char, std::char_traits >’未定义的引用 ./libs/x64/libmsc.so:对‘operator new(unsigned long)’未定义的引用 ./libs/x64/libmsc.so:对‘VTT for std::basic_stringstream<char, std::char_traits, std::allocator >’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringbuf<char, std::char_traits, std::allocator >::showmanyc()’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::seekoff(long, std::_Ios_Seekdir, std::_Ios_Openmode)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ostream<char, std::char_traits >& std::operator<< <std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const)’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::_M_leak_hard()’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::assign(char const, unsigned long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::throw_length_error(char const*)’未定义的引用 ./libs/x64/libmsc.so:对‘std::ios_base::ios_base()’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::compare(std::string const&) const’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_guard_release’未定义的引用 ./libs/x64/libmsc.so:对‘operator delete(void)’未定义的引用 ./libs/x64/libmsc.so:对‘std::ostream& std::ostream::_M_insert(long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_iostream<char, std::char_traits >::~basic_iostream()’未定义的引用 ./libs/x64/libmsc.so:对‘std::__throw_bad_cast()’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::_M_mutate(unsigned long, unsigned long, unsigned long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::numpunct const& std::use_facet<std::numpunct >(std::locale const&)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const, std::allocator const&)’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for std::basic_stringbuf<char, std::char_traits, std::allocator >’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::uflow()’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::showmanyc()’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_file::~__basic_file()’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_call_unexpected’未定义的引用 ./libs/x64/libmsc.so:对‘std::locale::locale()’未定义的引用 ./libs/x64/libmsc.so:对‘operator new[](unsigned long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ostringstream<char, std::char_traits, std::allocator >::basic_ostringstream(std::_Ios_Openmode)’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_pure_virtual’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ifstream<char, std::char_traits >::~basic_ifstream()’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for std::basic_ios<char, std::char_traits >’未定义的引用 ./libs/x64/libmsc.so:对‘typeinfo for std::ostream’未定义的引用 ./libs/x64/libmsc.so:对‘typeinfo for char const*’未定义的引用 ./libs/x64/libmsc.so:对‘typeinfo for float’未定义的引用 ./libs/x64/libmsc.so:对‘VTT for std::basic_ifstream<char, std::char_traits >’未定义的引用 ./libs/x64/libmsc.so:对‘std::locale::operator==(std::locale const&) const’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_allocate_exception’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::seekpos(std::fpos<mbstate_t>, std::_Ios_Openmode)’未定义的引用 ./libs/x64/libmsc.so:对‘std::throw_out_of_range(char const)’未定义的引用 ./libs/x64/libmsc.so:对‘__gxx_personality_v0’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::_Rep::_S_empty_rep_storage’未定义的引用 ./libs/x64/libmsc.so:对‘std::ctype::_M_widen_init() const’未定义的引用 ./libs/x64/libmsc.so:对‘std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base, std::_Rb_tree_node_base, std::_Rb_tree_node_base&)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&, unsigned long, unsigned long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::replace(unsigned long, unsigned long, char const, unsigned long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::xsgetn(char, long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::compare(char const) const’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::rfind(char, unsigned long) const’未定义的引用 ./libs/x64/libmsc.so:对‘typeinfo for bool’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_filebuf<char, std::char_traits >::~basic_filebuf()’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_throw’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_guard_abort’未定义的引用 ./libs/x64/libmsc.so:对‘std::throw_bad_alloc()’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::append(std::string const&)’未定义的引用 ./libs/x64/libmsc.so:对‘std::ios_base::Init::~Init()’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::_Rep::_M_dispose(std::allocator const&)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::xsputn(char const, long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::_Rb_tree_increment(std::_Rb_tree_node_base const)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ostream<char, std::char_traits >& std::ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const, long)’未定义的引用 ./libs/x64/libmsc.so:对‘typeinfo for std::basic_stringbuf<char, std::char_traits, std::allocator >’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::setbuf(char, long)’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_end_catch’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_guard_acquire’未定义的引用 ./libs/x64/libmsc.so:对‘typeinfo for int’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_filebuf<char, std::char_traits >::open(char const, std::_Ios_Openmode)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ostream<char, std::char_traits >::~basic_ostream()’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for std::basic_filebuf<char, std::char_traits >’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for std::basic_streambuf<char, std::char_traits >’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for cxxabiv1::vmi_class_type_info’未定义的引用 ./libs/x64/libmsc.so:对‘std::locale::~locale()’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for cxxabiv1::class_type_info’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::underflow()’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ios<char, std::char_traits >::fill() const’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringbuf<char, std::char_traits, std::allocator >::seekoff(long, std::_Ios_Seekdir, std::_Ios_Openmode)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::pbackfail(int)’未定义的引用 ./libs/x64/libmsc.so:对‘VTT for std::basic_ostringstream<char, std::char_traits, std::allocator >’未定义的引用 ./libs/x64/libmsc.so:对‘std::ios_base::Init::Init()’未定义的引用 ./libs/x64/libmsc.so:对‘std::ios_base::~ios_base()’未定义的引用 ./libs/x64/libmsc.so:对‘std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base)’未定义的引用 ./libs/x64/libmsc.so:对‘std::ostream& std::ostream::_M_insert(long long)’未定义的引用 ./libs/x64/libmsc.so:对‘dynamic_cast’未定义的引用 ./libs/x64/libmsc.so:对‘std::__throw_logic_error(char const)’未定义的引用 ./libs/x64/libmsc.so:对‘std::_Rb_tree_increment(std::_Rb_tree_node_base)’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for std::basic_ifstream<char, std::char_traits >’未定义的引用 ./libs/x64/libmsc.so:对‘std::detail::_List_node_base::_M_transfer(std::detail::_List_node_base, std::__detail::_List_node_base)’未定义的引用 ./libs/x64/libmsc.so:对‘std::_Rb_tree_decrement(std::_Rb_tree_node_base)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ios<char, std::char_traits >::init(std::basic_streambuf<char, std::char_traits >)’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::assign(char const)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ifstream<char, std::char_traits >::basic_ifstream(char const, std::_Ios_Openmode)’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::assign(std::string const&)’未定义的引用 ./libs/x64/libmsc.so:对‘std::istream::getline(char, long, char)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::sync()’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ios<char, std::char_traits >::rdbuf(std::basic_streambuf<char, std::char_traits >)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_filebuf<char, std::char_traits >::close()’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_streambuf<char, std::char_traits >::imbue(std::locale const&)’未定义的引用 ./libs/x64/libmsc.so:对‘virtual thunk to std::basic_ostream<char, std::char_traits >::~basic_ostream()’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringbuf<char, std::char_traits, std::allocator >::seekpos(std::fpos<__mbstate_t>, std::_Ios_Openmode)’未定义的引用 ./libs/x64/libmsc.so:对‘std::detail::_List_node_base::swap(std::__detail::_List_node_base&, std::detail::_List_node_base&)’未定义的引用 ./libs/x64/libmsc.so:对‘std::ostream& std::ostream::_M_insert(unsigned long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::ostream& std::ostream::_M_insert(bool)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_filebuf<char, std::char_traits >::basic_filebuf()’未定义的引用 ./libs/x64/libmsc.so:对‘std::ostream::operator<<(int)’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::resize(unsigned long, char)’未定义的引用 ./libs/x64/libmsc.so:对‘cxa_rethrow’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_stringbuf<char, std::char_traits, std::allocator >::setbuf(char, long)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)’未定义的引用 ./libs/x64/libmsc.so:对‘vtable for cxxabiv1::si_class_type_info’未定义的引用 ./libs/x64/libmsc.so:对‘std::locale::classic()’未定义的引用 ./libs/x64/libmsc.so:对‘std::ostream& std::ostream::_M_insert(double)’未定义的引用 ./libs/x64/libmsc.so:对‘std::ostream& std::ostream::_M_insert<void const>(void const)’未定义的引用 ./libs/x64/libmsc.so:对‘std::basic_ostream<char, std::char_traits >::~basic_ostream()’未定义的引用 ./libs/x64/libmsc.so:对‘virtual thunk to std::basic_ostream<char, std::char_traits >::~basic_ostream()’未定义的引用 ./libs/x64/libmsc.so:对‘std::string::append(char const, unsigned long)’未定义的引用

HaoQChen commented 5 years ago

看样子像是你用了C++功能?libmsc都是按照c来编译的。默认.c文件是按照C规则来编译的,但是.cpp是按照c++规则编译,这两者的函数签名是不一样的,需要用extern来声明。看输出,似乎是你混编的过程中,函数的定义或者声明没处理好