Undefined symbols for architecture armv7

 Undefined symbols for architecture armv7 또는 Undefined symbols for architecture i386 에러가 Xcode에서 빌드시 발생할 수 있습니다.


Undefined symbols for architecture i386:
  "aaa::bb()", referenced from:
      eee::~eee() in eee.o
  "aaa::ccc(aaaa)", referenced from:
      fff::fff() in fff.o
  "aaa::ddd()", referenced from:
      fff::ggg() in fff.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


 이런식으로 로그가 생기죠.

 원인은 Xcode에 소스코드 추가할 때 Add to targets의 체크를 해제하고 추가하면 이런 문제가 생기네요.

 프로젝트 네비게이터에서 문제가 되는 파일을 선택하고 오른쪽에 보이는 유틸리티의 Target Membership에서 프로젝트에 체크를 하고 빌드하면 에러가 해결됩니다.

댓글

이 블로그의 인기 게시물

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

[GWork] LNK2038 'RuntimeLibrary'에 대해 불일치가 검색되었습니다. 'MDd_DynamicDebug' 값이 'MTd_StaticDebug' 값과 일치하지 않습니다.

WCF 메시지를 수락할 수 있는 http://localhost:63397/Service1.svc에서 수신 대기 중인 끝점이 없습니다.