Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios ld:警告:找不到自动链接库';迅捷目标&x27;_Ios_Objective C_Swift_Xcode - Fatal编程技术网

Ios ld:警告:找不到自动链接库';迅捷目标&x27;

Ios ld:警告:找不到自动链接库';迅捷目标&x27;,ios,objective-c,swift,xcode,Ios,Objective C,Swift,Xcode,我正在从事一个用obj-c编写的遗留项目(iOS应用程序)。该项目链接到用obj-c编写的遗留静态库 该库通过使用Swift编写的代码进行了扩展,构建时没有错误 问题出现在项目级别,该级别生成时出现以下错误: ld: warning: Could not find auto-linked library 'swiftObjectiveC' ld: warning: Could not find auto-linked library 'swiftSwiftOnoneSupport' ld: wa

我正在从事一个用obj-c编写的遗留项目(iOS应用程序)。该项目链接到用obj-c编写的遗留静态库

该库通过使用Swift编写的代码进行了扩展,构建时没有错误

问题出现在项目级别,该级别生成时出现以下错误:

ld: warning: Could not find auto-linked library 'swiftObjectiveC'
ld: warning: Could not find auto-linked library 'swiftSwiftOnoneSupport'
ld: warning: Could not find auto-linked library 'swiftCoreAudio'
ld: warning: Could not find auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find auto-linked library 'swiftCore'
ld: warning: Could not find auto-linked library 'swiftQuartzCore'
ld: warning: Could not find auto-linked library 'swiftDarwin'
ld: warning: Could not find auto-linked library 'swiftsimd'
ld: warning: Could not find auto-linked library 'swiftFoundation'
ld: warning: Could not find auto-linked library 'swiftAVFoundation'
ld: warning: Could not find auto-linked library 'swiftCoreMedia'
ld: warning: Could not find auto-linked library 'swiftDispatch'
ld: warning: Could not find auto-linked library 'swiftCoreFoundation'
Undefined symbols for architecture x86_64:
  "protocol descriptor for Swift.Hashable", referenced from:
      protocol conformance descriptor for __C.AVAudioSessionCategory : Swift.Hashable in __C_Synthesized in libFindParking.a(libFindParking.a-x86_64-master.o)
      generic protocol witness table for __C.AVAudioSessionCategory : Swift.Hashable in __C_Synthesized in libFindParking.a(libFindParking.a-x86_64-master.o)
      protocol conformance descriptor for __C.AVAudioSessionMode : Swift.Hashable in __C_Synthesized in libFindParking.a(libFindParking.a-x86_64-master.o)
      generic protocol witness table for __C.AVAudioSessionMode : Swift.Hashable in __C_Synthesized in libFindParking.a(libFindParking.a-x86_64-master.o)
  • 如何解决这个问题
更新:


我没有使用Cocoapods

这里有一个对我有效的解决方案:

显然,对于纯objective-c项目,您需要将此$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)添加到目标的库搜索路径中。当我在objective-c中的一个项目中包含一个用swift编写的库时,这对我来说很有用


我做了这件事,但仍然得到了同样的错误,我一直试图将adMob添加到objective C项目中。ld:警告:找不到自动链接的框架“FBLPromises”,因此,您有另一个边缘案例。