Re: how to link to separate libs for i386 (10.4) and PPC (10.3.9) link
Re: how to link to separate libs for i386 (10.4) and PPC (10.3.9) link
- Subject: Re: how to link to separate libs for i386 (10.4) and PPC (10.3.9) link
- From: Rua Haszard Morris <email@hidden>
- Date: Wed, 17 May 2006 15:45:49 +1200
The problem was simply that I did not have equals (=) in my xcconfig
file.
This is what it now looks like:
GCC_VERSION_i386 = 4.0
GCC_VERSION_ppc = 4.0
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk
And it appears that this is a fairly correct way to set up a 10.3.9-
ppc-10.4-i386 universal build, so I'm posting to the list for anyone
like me who might have trouble with this!
cheers for listening
On 17/05/2006, at 11:38 AM, Rua Haszard Morris wrote:
I'm having problems linking a universal binary targeting 10.3.9 for
ppc and 10.4 for i386. The problem appears to be that the linker is
not being told where to look for the appropriate i386-specific libs:
/usr/bin/ld: warning /System/Library/Frameworks/Carbon.framework/
Carbon cputype (18, architecture ppc) does not match cputype (7)
for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-
darwin8/4.0.1/libstdc++.dylib does not contain an architecture that
matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-
darwin8/4.0.1/../../../libSystem.dylib does not contain an
architecture that matches the specified -arch flag: i386 (file
ignored)
/usr/bin/ld: warning fat file: /usr/lib/libSystem.B.dylib does not
contain an architecture that matches the specified -arch flag: i386
(file ignored)
/usr/bin/ld: Undefined symbols:
_DisposeDialog
<etc>
What worries me slightly is that I would expect the linker should
be looking in the target SDK for all these libs; it appears to be
using frameworks from /System and libs from /usr which are all PPC
(because my machine is a G4). Shouldn't all the frameworks and libs
come out of the appropriate sdk?
How do I set up Xcode to link to the correct libs - is it a matter
of more correctly prodding the linker with (perhaps) $LDFLAGS? Or
is there a more simple "correct" way of setting up the project?
I have tried specifying SDK-specific paths for frameworks and libs
as follows (via an xcconfig file):
FRAMEWORK_SEARCH_PATHS_ppc $(SDKROOT_ppc)/System/Library/Frameworks
FRAMEWORK_SEARCH_PATHS_i386 $(SDKROOT_i386)/System/Library/Frameworks
LIBRARY_SEARCH_PATHS_ppc $(LIBRARY_SEARCH_PATHS) $(SDKROOT_ppc)/usr/
lib
LIBRARY_SEARCH_PATHS_i386 $(LIBRARY_SEARCH_PATHS) $(SDKROOT_i386)/
usr/lib
but this doesn't seem to be the best approach.
Any tips from people who've got this kind of thing working would be
appreciated.
Thanks,
Rua HM.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40adinstruments.com
This email sent to email@hidden
_______________________________________________
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