Re: Linking universal binary framework with UNIX library
Re: Linking universal binary framework with UNIX library
- Subject: Re: Linking universal binary framework with UNIX library
- From: Andrew Zamler-Carhart <email@hidden>
- Date: Sun, 20 Nov 2005 14:05:06 -0500
Dear David et al,
Thanks for letting me know how to compile universal binaries on the
command line. The library (libjpeg.a) compiled for ppc/i386 with no
errors.
However, when I try to compile the framework that uses this library,
I get the following link errors:
ld: Undefined symbols:
_fprintf$LDBLStub
_sprintf$LDBLStub
_sscanf$LDBLStub
It appears that when I compile using make, it is linking with PowerPC-
only C libraries. Do I need to make it link with something in the
10.4u SDK?
Best regards,
Andrew
KavaSoft
On Nov 20, 2005, at 12:52 PM, David Young wrote:
On Nov 20, 2005, at 7:36 AM, Andrew Zamler-Carhart wrote:
Would it be possible to compile libjpeg.a on an Intel computer
(Developer Transition Kit or Linux PC?) and then incorporate both
a PowerPC and an Intel version of the library into the project for
the framework? Perhaps I could build with two targets and then
join them on the command line?
You can do either one, except for the Linux thing. I would compile
them both at the same time. In the Makefile, find the compiler
flags (usually the CFLAGS variable), and add "-arch ppc -arch
i386". If you want to compile them individually and assemble them,
you would run the make twice, using each of the -arch flags for
each pass, then use "lipo" on the command line to glue them
together (man lipo for details). There's no advantage to this (that
I know of).
You can also do this from a PowerPC machine as well, no Intel box
needed.
--dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden