xcode ios 使用webrtc的错误汇集

news/2024/7/20 20:44:48 标签: xcode, webrtc, macos, ios

1、xcode Use of undeclared identifier 'AF_UNSPEC'
       webrtc Unknown type name 'in_addr'

     Missing byte order functions for this arch.
增加宏 -DWEBRTC_POSIX -DWEBRTC_MAC -DWEBRTC_IOS

2、unknown type name 'constexpr' xcode
c++使用标准14

3、Failed to register bundle identifier: The app identifier "org.chromium.ObjCNativeAPIDemo" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.
修改app identifier "org.chromium.ObjCNativeAPIDemo" "org.xxxx.ObjCNativeAPIDemo"

4、Undefined symbol: _CMFormatDescriptionGetMediaSubType
-framework CoreMedia


5、Undefined symbol: _AudioOutputUnitStart
-framework AudioToolbox 

6、Undefined symbol: std::__1::__libcpp_debug_function
is_debug=false


 
7、Undefined symbol: _CGRectZero
CoreGraphics.framework

8、Undefined symbol: webrtc::ObjCToNativeVideoRenderer(id<RTCVideoRenderer>)

Showing Recent Messages
Undefined symbol: webrtc::ObjCToNativeVideoCapturer(RTCVideoCapturer*, rtc::Thread*, rtc::Thread*)

libnative_api.a

9、Undefined symbol: webrtc::ObjCVideoEncoderFactory::ObjCVideoEncoderFactory(id<RTCVideoEncoderFactory>)

Showing Recent Messages
Undefined symbol: typeinfo for webrtc::ObjCVideoTrackSource

libnative_video.a

10、
Undefined symbol: _OBJC_CLASS_$_RTCWrappedNativeVideoEncoder
libwrapped_native_codec_objc.a

11、

**dyld: Library not loaded: @rpath/WebRTC.framework/WebRTC**

**Referenced from: /private/var/containers/Bundle/Application/3CBB3D65-15DB-4033-A1B8-5316A2B98C80/WebRTC_new.app/WebRTC_new**

**Reason: no suitable image found.  Did find:**

**......**

12、Showing Recent Messages
Undefined symbol: _AVAudioSessionCategoryPlayAndRecord
AVFoundation.framework


13、Showing Recent Messages
Undefined symbol: _OBJC_CLASS_$_UIDevice

UIKit.framework


14、Showing Recent Messages
Undefined symbol: _OBJC_METACLASS_$_NSObject

Undefined symbol: __objc_empty_cache

Undefined symbol: _objc_moveWeak

Undefined symbol: _OBJC_CLASS_$_NSDictionary

Foundation.framework

15、This application or a bundle it contains has the same bundle identifier as this application or another bundle that it contains. Bundle identifiers must be unique.
Domain: com.apple.dt.MobileDeviceErrorDomain

多个动态库的时候,每个动态库工程的Bundle identifiers需不一样

16、error: unknown type name 'NSString'

一、

 二、

    add_compile_options(-x objective-c++)
三、建议把这部分代码封装到.mm文件中

17、Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RTCAudioSession setConfiguration:active:error:]: unrecognized selector sent to instance 0x1073d2920'

这是不能导入category分类导致的,加上选项-all_load

18、

Showing Recent Messages
Undefined symbol: _CMCopyDictionaryOfAttachments

CoreMedia.framework

19、Showing Recent Messages
Undefined symbol: _CGSizeZero

CoreGraphics.framework

20、no visible @interface for XXX declares the selector YYY

.m或者.mm内部访问interface的某个method是可以的,但是在别的.m或.mm访问这个method就报此错误,解决方法.h文件中申明此方法


http://www.niftyadmin.cn/n/1159606.html

相关文章

大数据系列修炼-Scala课程09

核心内容: 1、Scala单例对象详解 2、Scala伴生对象代码实战 1、Scala单例对象详解(1)Scala中没有静态方法或静态字段,但是通过object语法结构可以达到同样的目的,所谓Object对象类似于我们Java中的静态(static)类,Object对象里面的所有成员都是静态的,可以通过Object对象名的…

使用cmake生成ios 的xcode工程,支持Objective-C,c++混合编程

如果想在macOS上用CMake编译ios 的Objective-C&#xff0c;可以这样&#xff1a; cmake_minimum_required(VERSION 3.21)project(testSDK LANGUAGES CXX)set(NAME testSDK)set(SOURCESmain.mCallBackHandler.mm )add_executable(${NAME}${SOURCES} ) set_target_properties(…

大数据系列修炼-Scala课程10

核心内容: 1、scala中常用语法的两个约定(方法调用与apply方法的使用) 2、class中的apply实战详解 3、object中的apply实战详解 4、apply在伴生类与伴生对象中的实战详解 1、scala中常用语法的两个约定(方法调用与apply方法的使用)Scala 是构建在 JVM 上的静态类型的脚本语…

PHP魔术的封装方法总结!

前几天学了一点封装的方法&#xff0c;给大家分享分享&#xff01;当然还可以封装一个函数来连接数据库!接下来就是一些关键词的意思! __construct($argv1,$argv2,…) 功能&#xff1a;类的构造方法&#xff0c;作用是初始化对象 参数&#xff1a;任意多个&#xff0c;任意类型…

大数据系列修炼-Scala课程11

核心内容: 1、Scala中的继承问题 2、重写字段代码实例 3、重写方法代码实例 scala中的继承、重写问题1>scala中 extends、final关键字用法Java中相同 2>在Scala当中重写一个非抽象方法必须使用override关键字,即重写方法必须使用override 3>只有主构造器可以调用…

iOS,mac基于源码编译以及使用BOOST库

1&#xff0c;下载源码 下载并解压源码&#xff0c;下载路径&#xff08;来自https://www.boost.org/users/download/&#xff09;&#xff0c;现在以1.77为例&#xff1a;https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2 2&#xff0…

大数据系列修炼-Scala课程12

核心内容: 1、scala中抽象类、抽象方法、抽象字段的概念 2、抽象方法与抽象字段的重写 1、scala中抽象类、抽象方法、抽象字段的概念1>在scala中,含有抽象方法或抽象字段的类为抽象类(在Java中:含有抽象方法的类叫做抽象类) 2>没有执行体的方法叫做抽象方法,scala当中…

xcode 中-all_load、-ObjC、-force_load的使用和区别

1、报错 使用基于webrtc写的程序&#xff0c;编译和链接都没问题&#xff0c;但是运行中报一下错误&#xff1a; Terminating app due to uncaught exception NSInvalidArgumentException, reason: -[RTCAudioSession setConfiguration:active:error:]: unrecognized selecto…