我将混合语言框架链接到项目时遇到问题.
1)我使用Swift和Objective-C类创建框架.
2)主逻辑存储在Swift文件中.例如,带有调用NSLog的方法的类("调用Swift日志").
3)Objective-C文件有一个类,它有一个方法,我创建一个Swift类的实例并调用Swift-log方法.
4)我将此框架与我的Objective-C项目相关联,我可以在此项目中调用我需要的所有内容,但是当我想构建此项目时,我收到错误" linker command failed with exit code 1 (use -v to see invocation)"
并警告:
ld: warning: Could not find auto-linked library 'swiftFoundation'
ld: warning: Could not find auto-linked library 'swiftDarwin'
ld: warning: Could not find auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find auto-linked library 'swiftCore'
ld: warning: Could not find auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find auto-linked library 'swiftObjectiveC'
ld: warning: Could not find auto-linked library 'swiftDispatch'
ld: warning: Could not find …