10

I am working on a project with the Swift programming language and I am trying to use some code from some older Objective-c projects. I have created the bridge file and imported the headers that I need but I get the following error, which I know it has to do with linking some framework, but even when I added CoreGraphics as an added framework it still appears. Any ideas?

Undefined symbols for architecture x86_64: "_CGPointMake", referenced from: _CGPointAdd in SKActionEffects-669E235BD7235D6A.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks

UPDATE: setting the BaseSDK did not do the trick. This is what my build settings are like with xcode6.

enter image description here

μ4ρκ05
  • 585
  • 2
  • 5
  • 16
  • http://stackoverflow.com/questions/18913906/xcode-5-and-ios-7-architecture-and-valid-architectures set the BaseSDK to iOS – Eugene Sep 13 '14 at 08:28

2 Answers2

26

Check if the "Target Membership" of your files are appropriate.

ss

mishimay
  • 4,237
  • 1
  • 27
  • 23
  • This was it...saved me hours, awesome answer dude. I was adding files through a folder reference where I should have been just adding them in groups! Thanks!!! – Vincil Bishop Nov 05 '14 at 02:10
  • @md_develop Can you ellaborate what this means? I have the same error but am not sure where to find the target membership. I'm assuming its somewhere in the project settings – Unome Apr 15 '15 at 06:38
  • @Unome I added screen shot. It's not the project setting but the file property. – mishimay Apr 15 '15 at 08:38
  • i have the same error. However, I cannot select the target membership. It is gray and un-selectable. Any ideas? – μ4ρκ05 Aug 13 '15 at 13:32
  • Are you selecting `.h` file? Select `.m` or `.swift` file. – mishimay Aug 15 '15 at 02:23
  • @md_develop In my case, I'm using ScriptingBridge in swift, and using a generated .h file (which is supposed to NOT have a .m file) and so I can't select membership – Jono Nov 03 '15 at 21:33
  • This i think has the quality to be the accepted answer i've been trying to figure out what went wrong for the last 3 hours thanks so much. – Berker Soyluoglu Dec 31 '15 at 10:11
2

I don't think that adding a class to test target just to test it is a good idea. In my case checking "Allow testing Host Application APIs" made a difference.

Targets > YourApplicationUnitTests > Testing

Michal Cichon
  • 1,409
  • 14
  • 19