Kalpesh Panchasara
Kalpesh Panchasara

Reputation: 1750

how to solve this error : "Undefined symbols for architecture arm64"

I am getting this error continue, and there is no any error in the particular class. Can anyone tell me that how can i fix this error ?

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_MYCLASS", referenced from: objc-class-ref in MYCLASS.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 4

Views: 12050

Answers (3)

Somesh Gupta
Somesh Gupta

Reputation: 321

I think the error says you have not defined a member function of the class. In my case I forgot to define the constructor function and got this error. It usually depends on the compiler that you are using, for some compliers this error is not seen.

Upvotes: 1

Chanchal Warde
Chanchal Warde

Reputation: 983

You need to add necessary framework to your project. Check all third party party framework and search its required framework for support. For eg if you add google analytic then you need to add CoreData , Foundation etc framework. There is some framework is missing for which third party framework needs.

Upvotes: 2

张富城
张富城

Reputation: 116

  1. Press "Cmmand+Shift+K" to clean up, and quit Xcode.
  2. delete the cache Run "rm -rf ~/Library/Developer/Xcode/DerivedData" in terminal
  3. open the project and re-build it

Upvotes: 10

Related Questions