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: XCODE choose system's EXPAT instead of my. Argh....



On Jun 30, 2006, at 7:15 AM, Tom Dibble wrote:

On 6/30/06 6:32 AM, "Ruslan Zasukhin" <email@hidden> wrote:

On 6/30/06 3:54 PM, "Jochen Peters" <email@hidden> wrote:

Hi Jochen,

Hi Ruslan,

have you tried to disable switch "Link with default libs" ?

Yes, but then it not links...at in list of not found sylbols there was no
expat symbols. Only STD symbols.

Yeah, you'll need to re-specify the default libraries manually, excluding
the expat library. This is standard operating procedure when requiring a
static link of one particular library which is packaged as a dylib in the
system. Unless there's an "ignore specific default library" switch out
there somewhere (like what MS's linker uses), that's likely the only way
around this.

There's another way to do this which doesn't require you to know the list of standard libraries (which can change from release to release and shouldn't be hardcoded in your project). Specify the - search_paths_first flag to the linker (you might have to use -Wl,- search_paths_first in Xcode) and as long as you've given the path to your static library in your linker directories Xcode will use your .a file before it finds the system's dylib.


See the ld man page for details about -search_paths_first.

Hope this helps,
Eric

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

This email sent to email@hidden
References: 
 >Re: XCODE choose system's EXPAT instead of my. Argh.... (From: Tom Dibble <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.