大佬教程收集整理的这篇文章主要介绍了Swift Beta 6-令人困惑的链接器错误消息,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
即使是新版本的Beta6,我也遇到了这个错误,它是在坏版本被撤出后的数小时内发布的。
通过删除“派生”文件夹的内容,我已经解决了此错误以及其他类似的难以辨认的错误。您可以转到“偏好设置”>“位置”找到该文件夹的位置。
默认路径为:/ Users / [您的用户名] / library / Developer / Xcode / DerivedData
您也可以按住Option
,同时产品菜单是在Xcode,这将改变开Clean
来Clean Build
Folder
......而完成同样的任务,而不必到文件夹迫害。
在使用针对iOS 8的Xcode 6 beta 6构建Swift程序时,链接器出现错误消息。此代码已在Beta 5中正确编译并运行。
Undefined symbol for architecture x86_64:
__TFSs26_forceBridgeFromObjectiveCU__FTPSs9AnyObject_MQ__Q_",referenced from:
__TFC8RayTrace14RayTracingPlot15drawFocalPointfS0_FT_T_ in RayTracingPlot.o
ld: symbol(s) not found for architecture x86_64
这是有问题的代码:
private func drawFocalPoint() {
var attributes = Dictionary<@R_616_10495@ng,AnyObject>()
let F@R_616_10495@ng: @R_616_10495@ng = "F"
let distance: CGFloat = focalDistance
let centerX = CGRectGetMidX(bounds)
let centerY = CGRectGetMidY(bounds)
let circleRadius: CGFloat = 4.0
let focalPointFrame = CGRectMake(0,circleRadius * 2.0,circleRadius * 2.0)
var path = UIBezierPath(ovalInRect: focalPointFramE)
let color = UIColor.blackColor()
let currentContext = UIGraphicsGetCurrentContext()
CGContextSaveGState(currentContext)
let shadowColor = UIColor(white:0,alpha:0.75).CGColor
CGContextSetShadowWithColor(currentContext,CGSizeMake(0,4),CGFloat(8),shadowColor)
// Image F
var imageFPath = UIBezierPath(CGPath: path.CGPath)
let imageFTransform = CGAffineTransformMakeTranslation((centerX - distance - circleRadius),(centerY - circleRadius))
imageFPath.applyTransform(imageFTransform)
color.set()
imageFPath.fill()
F@R_616_10495@ng.drawAtPoint(CGPointMake(centerX - distance - circleRadius,centerY + 5),withAttributes:attributes)
CGContextSetShadowWithColor(currentContext,CGSizeMake(0.0,0.0),CGFloat(0.0),nil) // Clear shadow
CGContextRestoreGState(currentContext)
}
我希望在此代码中找到错误的提示,以便我可以解决。谢谢。
以上是大佬教程为你收集整理的Swift Beta 6-令人困惑的链接器错误消息全部内容,希望文章能够帮你解决Swift Beta 6-令人困惑的链接器错误消息所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。