other Link Flags

在Xcode中配置“链接器参数”时,将Target->Linking->other Link Flags 处设置为:“-ObjC”。


其他选项:-all_load; -force_load等。


-ObjC:加了这个参数后,链接器就会把静态库中所有的Objective-C类和分类都加载到最后的可执行文件中
-all_load:会让链接器把所有找到的目标文件都加载到可执行文件中,但是千万不要随便使用这个参数!假如你使用了不止一个静态库文件,然后又使用了这个参数,那么你很有可能会遇到ld: duplicate symbol错误,因为不同的库文件里面可能会有相同的目标文件,所以建议在遇到-ObjC失效的情况下使用-force_load参数。
-force_load:所做的事情跟-all_load其实是一样的,但是-force_load需要指定要进行全部加载的库文件的路径,这样的话,你就只是完全加载了一个库文件,不影响其余库文件的按需加载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
分析蓝牙打印”05-22 20:55:15.340 3861 3861 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@1702c5f 05-22 20:55:15.405 3861 3861 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1005 android.content.ContextWrapper.sendBroadcast:444 com.zhiying.bluetoothmodelservice.MainActivity.sendBroadcast:643 com.zhiying.bluetoothmodelservice.MainActivity.onCreate:84 android.app.Activity.performCreate:7136 05-22 20:55:15.409 1936 5786 E ActivityManager: Sending non-protected broadcast android.newlink.exit.bluetoothSpeaker from system 3861:com.zhiying.bluetoothmodelservice/1000 pkg com.zhiying.bluetoothmodelservice 05-22 20:55:15.419 1936 5786 E ActivityManager: Sending non-protected broadcast android.newlink.exit.bluetoothSpeaker from system 3861:com.zhiying.bluetoothmodelservice/1000 pkg com.zhiying.bluetoothmodelservice 05-22 20:55:15.491 1797 1797 I MediaPlayerFactory: [getNameByPid:285] pid(3861), cmdline task_name(com.zhiying.bluetoothmodelservice). 05-22 20:55:15.561 3861 5918 W MediaPlayerNative: info/warning (710, 20) 05-22 20:55:15.562 3861 5918 W MediaPlayerNative: info/warning (710, 40) 05-22 20:55:15.610 3861 5918 W MediaPlayerNative: info/warning (710, 80) 05-22 20:55:15.628 3861 5918 W MediaPlayerNative: info/warning (710, 90) 05-22 20:55:15.628 3861 3861 I bt.sink.btconAc: true-------service-------- 05-22 20:55:15.628 3861 5918 W MediaPlayerNative: info/warning (710, 100) 05-22 20:55:15.629 3861 3861 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1531 android.content.ContextWrapper.startService:664 com.zhiying.bluetoothmodelservice.MainActivity.setBluetoothServiceStatus:354 com.zhiying.bluetoothmodelservice.MainActivity.initData:187 com.zhiying.bluetoothmodelservice.MainActivity.onCreate:89 05-22 20:55:15.649 3861 3861 I UartUtils: setState: true 05-22 20:55:15.649 3861 3861 I HiMW_TVClient: [invoke:53] =============invoke cmd = 0xf10a=======begin============= 05-22 20:55:15.653 3861 3861 I HiMW_TVClient: [invoke:65] =============invoke cmd = 0xf10a=======end=============== 05-22 20:55:15.654 3861 3861 W AudioManager: Use of stream types is deprecated for operations other than volume control 05-22 20:55:15.654 3861 3861 W AudioManager: See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case 05-22 20:55:15.655 1936 5786 I MediaFocusControl: requestAudioFocus() from uid/pid 1000/3861 clientId=android.media.AudioManager@3140a29 callingPack=com.zhiying.bluetoothmodelservice req=2 flags=0x0 sdk=29 05-22 20:55:15.658 3861 3861 D bt.sink.btconAc: onResume: 05-22 20:55:15.658 3861 3861 D bt.sink.btconAc: getBreathingScreenDatas: Could not find remote control icon properties 05-22 20:55:15.702 3861 3861 I bt.sink.btsevice: blueToothChange:关闭 05-22 20:55:15.706 3861 3861 D BluetoothAdapter: enable(): BT already enabled! 05-22 20:55:15.738 3861 3894 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 05-22 20:55:15.738 3861 3894 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retriev
最新发布
05-23

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值