Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Zlib for i386 code




David Chan <email@hidden> wrote:

Hi all,

Sometimes ago I emailed asking about decompressing file and I was told
to use zlib. I have used it successfully so far for my project. But
there is problem when I try to compile my project for intel-based
machine. fyi, I am working on powerpc at the moment, using xcode 2.2,
and the project itself is mainly using objective-c language. I need to
compile this project to be universal-binary-enabled as the clients
machine require so.

When I set the architecture to both intel and ppc, I stumble into
errors where zlib's functions such as inflate, inflateEnd, etc.. get
Undefined Symbol error message.

So the command line such as:

int err=inflateInit_(&m_ZRec, zlib_version, sizeof (m_ZRec));

which would cause no error when compiling for ppc, is know becoming an
error. This command line is written in an objective c class that
already include zlib.h.  I wonder what could the problem be. Thanks in
advance for the pointers on this problem.

Regards
David

Adding the -lz option to the "Other Linker Flags" in Xcode solves this problem.
--
gue = Günther Blaschek


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.