ios - Can link in Obj C, can't find symbols and won't link in Swift -


i'm working convert ios project else wrote obj c swift.

the project in obj c form builds , runs fine, , shows it's under x86_64 architecture.

when try build in swift, error 'undefined symbols architecture x86_64'. message :

undefined symbols architecture x86_64:   "_drcollectionviewtablelayoutsupplementaryviewcolumnheader", referenced from:       __tfc13cvtablelayout14viewcontroller11viewdidloadfs0_ft_t_ in viewcontroller.o       __tfc13cvtablelayout14viewcontroller32collectionviewtablelayoutmanagerfs0_ftgsqcso34drcollectionviewtablelayoutmanager_14collectionviewgsqcso16uicollectionview_19headerviewforcolumnsu9indexpathgsqcso11nsindexpath__gsqcso24uicollectionreusableview_ in viewcontroller.o 

the values referenced defined in drcollectionviewtablelayout.h, between #import , @class line, this:

/** *  supplementary view kind column headers   */ static nsstring * const drcollectionviewtablelayoutsupplementaryviewcolumnheader = @"drcollectionviewtablelayoutsupplementaryviewcolumnheader";  /**  *  supplementary view kind row headers  */ static nsstring * const drcollectionviewtablelayoutsupplementaryviewrowheader = @"drcollectionviewtablelayoutsupplementaryviewrowheader"; 

my bridging header file in place , looks this:

#import "drcollectionviewtablelayout.h" #import "drcollectionviewtablelayoutmanager.h" 

my viewdidload references these constants below:

override func viewdidload() {     super.viewdidload()      collectionview.registerclass(uicollectionreusableview.self, forsupplementaryviewofkind: drcollectionviewtablelayoutsupplementaryviewcolumnheader, withreuseidentifier: collectionviewheaderidentifier)      collectionview.registerclass(uicollectionreusableview.self, forsupplementaryviewofkind: drcollectionviewtablelayoutsupplementaryviewrowheader, withreuseidentifier: collectionviewheaderidentifier)       collectionview.registerclass(uicollectionviewcell.self, forcellwithreuseidentifier: collectionviewcellidentifier)      let collectionviewlayout = drcollectionviewtablelayout(delegate: self.collectionmanager)     collectionviewlayout.horizontalspacing = 5.0     collectionviewlayout.verticalspacing = 5.0     collectionview.collectionviewlayout = collectionviewlayout     collectionview.datasource = collectionmanager     collectionview.delegate = collectionmanager } 

my .m files , .swift in target.

i have deleted deriveddata.

i'm using xcode 6.3.2

any ideas why won't link?

if redeclare constants in swift file, problem goes away. think problem "static" use in obj c file. added view controller. i'm not sure best way it, after 2 days of trying i'll go it:

let drcollectionviewtablelayoutsupplementaryviewcolumnheader = "drcollectionviewtablelayoutsupplementaryviewcolumnheader" let drcollectionviewtablelayoutsupplementaryviewrowheader = "drcollectionviewtablelayoutsupplementaryviewrowheader" 

Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -