在一个VOIP的项目中需要用的RTP库,开始选择ortp和mediastream库,现基本能实现一对一通话,但是otrp库没有实现RTP协议中多个参与者的情况,不满足项目需求。看了下现在网上用的很多的Jrtplib,只能支持多个参与者的情况,因此不得已移植Jrtplib到RTT上,但是Jrtplib 是C++编写的rtp库,库中使用了C++标准库,编译完后链接出现很大的问题,网上查了资料说没有连接libstdc++ libsupc++库,但是加上以后还是没有解决,主要错误提示有:
``In functionstd::list >::_M_insert(std::_List_iterator, jrtplib::RTCPPacket const&)’:
undefined reference to `std::detail:_List_node_base:_M_hook(std::detail::_List_node_base)’
In function __gnu_cxx::new_allocatorstd::_List_node >::allocate(unsigned int, void const*)': undefined reference tostd::__throw_bad_alloc()’
undefined reference to std::allocator
undefined reference to std::basic_string<char, std::char_traits
undefined reference to `std::allocator::~allocator()’
undefined reference to stdstringfind(char, unsigned int) const' undefined reference tostd:string:length() const’
undefined reference to `std::string::c_str() const’```
编译选项是:
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections'
CFLAGS = DEVICE + ' -g -Wall -DSTM32F407ZG -DSTM32F4XX -DUSE_STDPERIPH_DRIVER -D__ASSEMBLY__ -D__FPU_USED'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE+ ' -lc -lm -lstdc++ -lsupc++ -nostartfiles -Wl,-v,--gc-sections,-Map=rtthread-stm32.map,-cref,-u,Reset_Handler -T stm32_rom.ld'
CXXFLAGS= CFLAGS + ' -fno-exceptions fno-rtti '
各位走过路过的大神们,帮小弟看下是什么原因,谢谢!!!
更多回帖