views:

3282

answers:

6

I have included in my iphone application and the source code I was mocking up the sample code of Molecules provided by Brad Larson, however, when I build the project, it returns the error as below. Can anyone point out for me whether this is a library linking problem or am I missing something else?

"_deflate", referenced from: -[NSData(Gzip) gzipDeflate] in NSData+Gzip.o "_inflateEnd", 
referenced from: -[NSData(Gzip) initWithGzippedData:] in NSData+Gzip.o "inflateInit2", 
referenced from: -[NSData(Gzip) initWithGzippedData:] in NSData+Gzip.o "_inflate", 
referenced from: -[NSData(Gzip) initWithGzippedData:] in NSData+Gzip.o "_deflateEnd", 
referenced from: -[NSData(Gzip) gzipDeflate] in NSData+Gzip.o "deflateInit2", referenced 
from: -[NSData(Gzip) gzipDeflate] in NSData+Gzip.o ld: symbol(s) not found collect2: ld 
returned 1 exit status
+7  A: 

In your Target settings window, scroll down to the "Other Linker Flags" section and make sure that -lz is in the field. This will link against the built-in zlib, and your error should go away.

Ben Gottlieb
yeah it solve the problem thanks
issac
+12  A: 
Jason Coco
A: 

thanks everybody it works perfectly

issac
A: 

Hi,

Can anyone help me in knowing, what actually the molecules code do, of one of the following..

a) Does it download the gzip fie using iphone sdk and then uncompress it using zlib. b) or Does it directly download the buffer and utilise it

I have gone through the code, but I didnt got much clear Idea. Please help.

Try asking a new question--the answers area is not for comments or answers.
bentford
A: 

WOW!! I can't believe I wasted around 2 hours trying to figure out why my libraries wouldn't link. You saved my life. I'm eternally grateful to you. :D :D :D

Anything that's not an answer should go in the comments area like this.
bentford
A: 

thank you very much Its cleared 8 errors to my project .......

suresh
The answers area is not for comments.
bentford