0
  • I have an IOS-App SWIFT Project on Xcode 7.2 on my older yosemite machine, which works and builds fine.
  • I have a new MAC running "El Capitan" with Xcode 7.3.1
  • I have migrated my project to the new machine by just copying: the project folder, all external libraries and frameworks, imported provisioning profiles and keys
  • My Project has no syntax errors anymore, after referencing all libraries to the new folder structure.

Now I build the project and I get the following error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_SSZipArchive", referenced from:
      type metadata accessor for __ObjC.SSZipArchive in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I don't know how to analyse this problem, thats why I am asking here. Any help ?

I have added a small project for reproducing the error with Xcode 7.3.1 : https://drive.google.com/open?id=0BzTzuiIaUzqkeTNrQTZkdGxrUnM Its a zipfile, which content can be unzipped onto the desktop. (SSArchiveTest is the rootfolder)

UPDATE

When trying to run on the IPAD I get the same error but referencing architecture arm64:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SSZipArchive", referenced from:
      type metadata accessor for __ObjC.SSZipArchive in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

UPDATE 2 What I have done so far

What I have done so far: - deleted derived data from xcode -> window -> project -> delete ... - Updated SSZipArchive from GIT by downloading the newest source and replacing all stuff I already had in my running project.

UPDATE 3 Small project added

I have added a small project for reproducing the error with Xcode 7.3.1: https://drive.google.com/open?id=0BzTzuiIaUzqkeTNrQTZkdGxrUnM Its a zipfile, which content can be unzipped onto the desktop. (SSArchiveTest is the rootfolder)

Cœur
  • 37,241
  • 25
  • 195
  • 267
mcfly soft
  • 11,289
  • 26
  • 98
  • 202
  • Link errors normally come down to one of the following issues: 1) the library/framework is not being found by the linker (see *Library Search Paths* in *Build Settings*). 2) The library/framework doesn't support the CPU architecture required. To see if that's the issue you need to find the library/framework and use the `file` command on it to see what architectures it supports and probably get a newer/better version of the library. – Droppy Jun 18 '16 at 09:01
  • I am not aware of using a library. I am just using *.h and *.m files, which of one I am bridging to the swift project. Probably I am understanding something wrong ? – mcfly soft Jun 19 '16 at 07:32
  • I had assumed you were using the SSZipArchive code from a library. If you are directly adding the `.m` files then it's probably just an issue with the target membership of the source file(s). – Droppy Jun 19 '16 at 08:34

3 Answers3

0

You are using the SSZipArchive in your project. If you used cocoapods to install it, update the podfile.

Open a terminal window, go into your project folder and run

pod update
Forge
  • 6,538
  • 6
  • 44
  • 64
john elemans
  • 2,578
  • 2
  • 15
  • 26
  • I do not use cocoapads, but I have updated the newest sources from GIT. I downloaded the latest SSZipArchive from GIT and replaced the SSZipArchive.h and .m & all minizip files. Still I have the same issue. Any help ? – mcfly soft Jun 18 '16 at 08:17
  • check your build settings. The architecture of the build must match that of the library you are linking with. – john elemans Jun 18 '16 at 22:03
0

I solved the issue. Simpl adding the zlib.tbd in linking libraries solved the issue.

mcfly soft
  • 11,289
  • 26
  • 98
  • 202
0

I had the same problem. The solution was to add all the *.c files (from the minizip and aes folders) to Targets --> Build Phases --> Compile Sources.

waltcrit
  • 53
  • 1
  • 5