Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture x86_64 iOS swift

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

like image 908
μ4ρκ05 Avatar asked Sep 13 '14 07:09

μ4ρκ05


People also ask

What is undefined symbols for architecture x86_64?

Why Is the Undefined Symbols for Architecture x86_64: Error Happening? This error is happening due to the lack of included values inside the declared statements in your code. The browser is going to render the information incorrectly and show this error, especially if you are working with Main and Similarity tools.

How do I fix undefined symbol in XCode?

The error Undefined symbols for architecture arm64: "_OBJC_CLASS_$_SKAdImpression" during the iOS build usually happens if XCode or CocoaPods version is lower than required. To fix it update XCode to 12.5 or higher and CocoaPods to 1.10. 0 or higher.

What is an undefined symbol?

A symbol remains undefined when a symbol reference in a relocatable object is never matched to a symbol definition. Similarly, if a shared object is used to create a dynamic executable and leaves an unresolved symbol definition, an undefined symbol error results.


2 Answers

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

like image 88
Michal Cichon Avatar answered Oct 16 '22 06:10

Michal Cichon


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

ss

like image 22
mishimay Avatar answered Oct 16 '22 04:10

mishimay