Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture armv7 when adding CocoaAsyncSocket

I am trying to use XMPPFramework with an iOS5 project (ARC) under xcode 4.2.1 but I am facing this problem. Once I add CocoaAsyncSocket to my project as part of preparing my project to use XMPPFramework as in 1I get the following error.

I have seen some other people having the "Undefined symbols for architecture armv7" but I did not find yet an answer to this particular issue I have at the moment.

I have linked to the CFNetwork and marked the GCDAsyncSocket.m as non-ARC (-fno-objc-arc) but i still get the error. Any help is appreciated.

Undefined symbols for architecture armv7:
  "_SSLGetBufferedReadSize", referenced from:
      ___33-[GCDAsyncSocket flushSSLBuffers]_block_invoke_0 in GCDAsyncSocket.o
      -[GCDAsyncSocket doReadData] in GCDAsyncSocket.o
  "_SSLSetIOFuncs", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLRead", referenced from:
      -[GCDAsyncSocket flushSSLBuffers] in GCDAsyncSocket.o
      -[GCDAsyncSocket doReadData] in GCDAsyncSocket.o
  "_SSLWrite", referenced from:
      -[GCDAsyncSocket doWriteData] in GCDAsyncSocket.o
  "_SSLClose", referenced from:
      -[GCDAsyncSocket closeWithError:] in GCDAsyncSocket.o
  "_SSLCreateContext", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetEnabledCiphers", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetCertificate", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetConnection", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLHandshake", referenced from:
      -[GCDAsyncSocket ssl_continueSSLHandshake] in GCDAsyncSocket.o
  "_SSLSetProtocolVersionMax", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetPeerDomainName", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetProtocolVersionMin", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
like image 846
Future2020 Avatar asked Apr 05 '12 11:04

Future2020


People also ask

How do I fix linker error undefined symbols for Architecture arm64?

You can fix the linker error by going to project -> target (your project name) -> build settings and change architectures to standard architectures (armv7, armv7s), and valid architectures to armv7, armv7s.

What is undefined symbols for Architecture arm64?

It means that framework is not included.

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.


1 Answers

You just need to add SecurityFramework in the Frameworks. I also met this same problem.

like image 132
sunmax Avatar answered Oct 16 '22 09:10

sunmax