我正在尝试将WebRTC
的c ++ api集成到我的项目中。而且我能够libwebrtc
在Windows上构建并链接它。
该项目是跨平台的,因此应使用NDK进行编译。但是当我包含WebRTC
标头时,它抱怨如下:
webrtc/p2p/base/icetransportinternal.h(141,42) : error: no member named 'to_string' in namespace 'std'
webrtc/p2p/base/icetransportinternal.h(141,42) : error: no member named 'to_string' in namespace 'std'
webrtc/p2p/base/transportchannel.h(66,42) : error: no member named 'to_string' in namespace 'std'
webrtc/p2p/base/transportchannel.h(66,42) : error: no member named 'to_string' in namespace 'std'
我知道std::to_string
在NDK环境中不可用(请参阅Android ndk std :: to_string support)。但是更奇怪的是,我已经成功地libwebrtc
为Android构建了。
我该如何解决这种情况?
我知道std :: to_string在NDK环境中不可用(请参阅Android ndk std :: to_string支持)。
取决于您选择的STL;具体取决于您选择的STL。它可用于libc ++,但不能用于gnustl(https://github.com/android-ndk/ndk/issues/82)。大概的webrtc是使用libc ++构建的,而您使用的是gnustl。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句