Skip navigation.
 
mluniversal/intel zlib in framework
FROM : Mike Abdullah
DATE : Thu Jul 27 00:38:05 2006

I am trying to build a framework that uses zlib and it's minizip 
extension.

I create the framework and add the minizip C files to it.  No problem
I then link to /usr/lib/libz.dylib.  Also no problem

The framework happily compiles in release mode and lipo reports that 
the framework is universal.

So, I then create a new application and add my framework to it.  In 
development mode, this compiles fine.  However, when I switch to 
release mode, I get this error:

Building target “Framework tester” of project “Framework tester” with 
configuration “Release” — (1 error, 1 warning)
       cd "/Users/dev/Documents/Archive Vault/Framework tester"
    /usr/bin/gcc-4.0 -o /Users/dev/Documents/Archive\ Vault/Framework
\ tester/build/Framework\ tester.build/Release/Framework\ 
tester.build/Objects-normal/i386/Framework\ tester -L/Users/dev/
Documents/Archive\ Vault/Framework\ tester/build/Release -F/Users/dev/
Documents/Archive\ Vault/Framework\ tester/build/Release -F/Users/dev/
Documents/Archive\ Vault/Framework\ tester/../MZZipArchive\ Framework/
build/Debug -F/Users/dev/Documents/Archive\ Vault/Framework\ 
tester/../MZZipArchive\ Framework/build/Release -filelist /Users/dev/
Documents/Archive\ Vault/Framework\ tester/build/Framework\ 
tester.build/Release/Framework\ tester.build/Objects-normal/i386/
Framework\ tester.LinkFileList -framework MZZipArchive -framework 
Cocoa -arch i386 -Wl,-Y,1455 -mmacosx-version-min=10.4 -isysroot /
Developer/SDKs/MacOSX10.4u.sdk
/usr/bin/ld: warning /Users/dev/Documents/Archive Vault/Framework 
tester/../MZZipArchive Framework/build/Debug/MZZipArchive.framework/
MZZipArchive cputype (18, architecture ppc) does not match cputype 
(7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: Undefined symbols:
.objc_class_name_ObjZip
/Users/dev/Documents/Archive Vault/Framework tester/build/Framework 
tester.build/Release/Framework tester.build/Objects-normal/i386/
COntroller.o reference to undefined .objc_class_name_ObjZip
collect2: ld returned 1 exit status
       /usr/bin/ld: warning /Users/dev/Documents/Archive Vault/Framework 
tester/../MZZipArchive Framework/build/Debug/MZZipArchive.framework/
MZZipArchive cputype (18, architecture ppc) does not match cputype 
(7) for specified -arch flag: i386 (file not loaded)
       /usr/bin/ld: Undefined symbols:
       .objc_class_name_ObjZip
       /Users/dev/Documents/Archive Vault/Framework tester/build/Framework 
tester.build/Release/Framework tester.build/Objects-normal/i386/
COntroller.o reference to undefined .objc_class_name_ObjZip
       collect2: ld returned 1 exit status
Build failed (1 error, 1 warning)

As far as I can make out, he compiler is saying that my framework 
does not support Intel.  Indeed, if I modify my release target to 
only build for PPC, everything works fine.

So, the only reason I could see for my framework to not be Universal, 
was that I had linked to /usr/lib/libz.dylib

I checked, and indeed this is PPC only.  So instead I link to the 
universal version in the 10.4uSDK.  Same thing again.  And if I don't 
link to either, but add the -lz compiler option, same again.

So, um, does anyone know what my problem might be?

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

This email sent to <email_removed>

Related mailsAuthorDate
mluniversal/intel zlib in framework Mike Abdullah Jul 27, 00:38
mlRe: universal/intel zlib in framework Mike Abdullah Jul 27, 11:15
mlRe: universal/intel zlib in framework Stefan Schüßler Jul 27, 14:33