相关疑难解决方法(0)

Swift beta 6 - 令人困惑的链接器错误消息

我在使用Xcode 6 beta 6构建Swift程序时,从链接器收到一条错误消息,目标是iOS 8.这段代码在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
Run Code Online (Sandbox Code Playgroud)

这是有问题的代码:

private func drawFocalPoint() {
    var attributes = Dictionary<String, AnyObject>()

    let FString: String = "F"
    let distance: CGFloat = focalDistance

    let centerX = CGRectGetMidX(bounds)
    let centerY = CGRectGetMidY(bounds)

    let circleRadius: CGFloat = 4.0
    let focalPointFrame = CGRectMake(0, 0, circleRadius * 2.0, circleRadius * 2.0)
    var path = UIBezierPath(ovalInRect: focalPointFrame)
    let color = UIColor.blackColor()

    let currentContext = …
Run Code Online (Sandbox Code Playgroud)

swift xcode6

58
推荐指数
2
解决办法
2万
查看次数

Xcode beta 6错误

对于在Bata 6中遇到类似问题的任何人,我通过删除/ Users/[您的用户名]/Library/Developer/Xcode/DerivedData中的内容解决了这个问题,这可以在这篇文章中看到.在Swift中突然出现编译器崩溃"arrayForceCast" XCode beta 6

原帖:

我刚刚安装了Xcode beta 6,并且遇到了非常不寻常的错误.我无法弄清楚它们是什么.

Undefined symbols for architecture arm64:
"__TFSsoi1oUSs17_RawOptionSetType_USs21BitwiseOperationsTypeSs9Equatable__FTQ_Q__Q_",   referenced from:
  __TFC9CoolSpots29ProfileSettingsViewController13turnOnOffPushfS0_FCSo8UISwitchT_ in ProfileSettingsViewController.o
  __TFC9CoolSpots11AppDelegate11applicationfS0_FTCSo13UIApplication29didFinishLaunchingWithOptionsGSqCSo12NSDictionary__Sb in AppDelegate.o
"__TFSs15_arrayForceCastU___FGSaQ__GSaQ0__", referenced from:
  __TFC9CoolSpots8LocationcfMS0_FT6objectCSo8PFObject_S0_ in Location.o
  __TFC9CoolSpots19ShareViewController7mapViewfS0_FTGSQCSo9MKMapView_21didAddAnnotationViewsGSQGSaPSs9AnyObject____T_ in ShareViewController.o
  __TFC9CoolSpots23LoginMenuViewController7FBLoginfS0_FT_T_ in LoginMenuViewController.o
  __TFC9CoolSpots21ProfileViewController7mapViewfS0_FTGSQCSo9MKMapView_21didAddAnnotationViewsGSQGSaPSs9AnyObject____T_ in ProfileViewController.o
  __TFFC9CoolSpots21ProfileViewController11viewDidLoadFS0_FT_T_U_FTGSqGSaPSs9AnyObject___GSqCSo7NSError__T_ in ProfileViewController.o
  __TFFFC9CoolSpots21ProfileViewController11viewDidLoadFS0_FT_T_U_FTGSqGSaPSs9AnyObject___GSqCSo7NSError__T_U0_FTGSqGSaPS1____GSqS2___T_ in ProfileViewController.o
  __TFFFC9CoolSpots21ProfileViewController11viewDidLoadFS0_FT_T_U0_FTGSqCSo8PFObject_GSqCSo7NSError__T_U0_FTGSqGSaPSs9AnyObject___GSqS2___T_ in ProfileViewController.o
  ...
"__TFSs26_forceBridgeFromObjectiveCU__FTPSs9AnyObject_MQ__Q_", referenced from:
  __TFC9CoolSpots8LocationcfMS0_FT11coordinatesVSC22CLLocationCoordinate2D15relatedActivityCSo7NSArray8objectIdSS7addressSS_S0_ in Location.o
  __TFC9CoolSpots8LocationcfMS0_FT6objectCSo8PFObject_S0_ in Location.o
  __TFC9CoolSpots19ShareViewController14viewWillAppearfS0_FSbT_ in ShareViewController.o
  __TFC9CoolSpots19ShareViewController15prepareForSeguefS0_FTGSQCSo17UIStoryboardSegue_6senderGSQPSs9AnyObject___T_ in ShareViewController.o
  __TFC9CoolSpots19ShareViewController21cameraViewTookPicturefS0_FCSo7UIImageT_ in ShareViewController.o
  __TFFC9CoolSpots19ShareViewController14reverseGeocodeFS0_FGSqCSo10CLLocation_T_U_FTGSQGSaPSs9AnyObject___GSQCSo7NSError__T_ in ShareViewController.o
  __TFC9CoolSpots27ActivityTableViewController11viewDidLoadfS0_FT_T_ in ActivityTableViewController.o
  ...
ld: symbol(s) not found for …
Run Code Online (Sandbox Code Playgroud)

beta xcode compiler-errors

12
推荐指数
2
解决办法
2517
查看次数

架构armv7 swift的未定义符号

我最近更新到Xcode 6 Beta 6,现在我在Beta 5中运行良好的应用程序中遇到这些错误.我一直在浏览每个方法并注释掉引起问题的行,但是还有另一个解决方案.这是日志.

Undefined symbols for architecture armv7:
  "__TFSs26_forceBridgeFromObjectiveCU__FTPSs9AnyObject_MQ__Q_", referenced from:
      __TFC9BookSmart32AdvanceDetailTableViewController11viewDidLoadfS0_FT_T_ in AdvanceDetailTableViewController.o
      __TFC9BookSmart32AdvanceDetailTableViewController27numberOfSectionsInTableViewfS0_FGSqCSo11UITableView_Si in AdvanceDetailTableViewController.o
      __TFC9BookSmart33AdvancesNewLocationViewController12returnedDatafS0_FCSo12NSDictionaryT_ in AdvancesNewLocationViewController.o
      __TFC9BookSmart31ArtistDetailTableViewController19scrollViewDidScrollfS0_FGSQCSo12UIScrollView_T_ in ArtistDetailTableViewController.o
      __TFC9BookSmart31ArtistDetailTableViewController14viewWillAppearfS0_FSbT_ in ArtistDetailTableViewController.o
      __TFC9BookSmart31ArtistDetailTableViewController11viewDidLoadfS0_FT_T_ in ArtistDetailTableViewController.o
      __TFC9BookSmart18ChatViewController11viewDidLoadfS0_FT_T_ in ChatViewController.o
      ...
  "__TFSs15_arrayForceCastU___FGSaQ__GSaQ0__", referenced from:
      __TFFC9BookSmart33AdvanceSectionTableViewController9tableViewFS0_FTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_GSqCSo15UITableViewCell_U_FTGSQCSo21MKLocalSearchResponse_GSQCSo7NSError__T_ in AdvanceSectionTableViewController.o
      __TFFFC9BookSmart33AdvanceSectionTableViewController9tableViewFS0_FTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_GSqCSo15UITableViewCell_U_FTGSQCSo21MKLocalSearchResponse_GSQCSo7NSError__T_U_FTGSQCSo13MKMapSnapshot_GSQS5___T_ in AdvanceSectionTableViewController.o
      __TFC9BookSmart32AdvanceDetailTableViewController11viewDidLoadfS0_FT_T_ in AdvanceDetailTableViewController.o
      __TFC9BookSmart32AdvanceDetailTableViewController9tableViewfS0_FTGSQCSo11UITableView_18commitEditingStyleOSC27UITableViewCellEditingStyle17forRowAtIndexPathGSQCSo11NSIndexPath__T_ in AdvanceDetailTableViewController.o
      __TFC9BookSmart32AdvanceDetailTableViewController17createAdvanceInfofS0_FTGVSs10DictionarySSSS_6forKeySS5andIdSS_T_ in AdvanceDetailTableViewController.o
      __TFC9BookSmart33AdvancesNewLocationViewController21textFieldShouldReturnfS0_FCSo11UITextFieldSb in AdvancesNewLocationViewController.o
      __TFFC9BookSmart33AdvancesNewLocationViewController21textFieldShouldReturnFS0_FCSo11UITextFieldSbU_FTGSQCSo21MKLocalSearchResponse_GSQCSo7NSError__T_ in AdvancesNewLocationViewController.o
      ...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see …
Run Code Online (Sandbox Code Playgroud)

ios swift

7
推荐指数
1
解决办法
2416
查看次数

标签 统计

swift ×2

beta ×1

compiler-errors ×1

ios ×1

xcode ×1

xcode6 ×1