On May 9, 2007, at 7:38 AM, Dave wrote: Now I have one more problem:
I have a dynamic library that is compiled as two separate .dylib files one for PowerPC and one for i86. How can I select which file to use the right dylib depending on the configuration selected??
1) Don't do this if you can avoid it. Build the .dylib file fat in the first place. There's little reason not to.
2) Use lipo to combine the two into one before linking with your Xcode project.
3) If you must do it this way, set these two Custom Build Settings in your target (for all configurations):
OTHER_LINKER_FLAGS_ppc = -l<path-to-ppc-dylib> OTHER_LINKER_FLAGS_i386 = -l<path-to-intel-dylib>
(That's dash, ell, followed by the path)
Then set the Other Linker Flags build setting for all configurations to
$(OTHER_LINKER_FLAGS_$(CURRENT_ARCH))
That instructs the linker to link your binary with different libraries for each of the ppc and i386 architectures.
Chris |