Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4 - Linking error when archiving application

We have been using Xcode 4 and LLVM 2.0 for a couple of months now and after finishing a huge update to our application we thought we would send it off to Apple.

What we couldn't imagine however, was that although the program was able to be built for both the simulator and devices, when it came to archiving, XCode just threw a nasty linking error and left us hanging there.

The error is related to the ZipKit library (we previously discussed the issues we had with making it work under XCode 4).

This is what we get:

ld: library not found for -ltouchzipkit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1

So the question is: do we need to change any settings for an app that builds fine to be able to get archived as well?

like image 315
Argiris Avatar asked Nov 15 '22 00:11

Argiris


1 Answers

Not trying to be flip, but it looks like the problem is that the linker can't find a library called "touchzipkit". The fact that this problem only comes up when you archive would seem to indicate your target has (at least one) build setting that has different values for "debug" and "release"... and that the "release" value is broken.

Not being familiar with ZipKit, I'm just shooting in the dark here. But I'd start checking out your build settings one by one, paying particular attention to library search paths and compiler flags where the debug and release settings are different.

like image 98
jemmons Avatar answered Dec 09 '22 10:12

jemmons