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: linking in static libraries under xcode?



On 06/02/2004, at 3:11 AM, Shantonu Sen wrote:
What?!?!?!!?

No, Xcode can use static archives just fine.
1) For your tool target "reader", add a "Frameworks and Libraries" phase if it doesn't have one already. Project > New Build Phase > New Frameworks and Libraries Phase
2) Add the library. Projects > Add Frameworks... Navigate to your static archive. Add it to the appropriate targets via checkboxes
3) If you later need to add it to other targets, drag the reference in your project hierarchy to the appropriate "Frameworks and Libraries" phase

I don't think you are contradicting what I said, just helpfully expanding it. Was I wrong to say that you cannot use use '-lfoo' on an ld command line if libfoo.a is a conventional archive? I certainly tried test cases on this and ld spat the dummy every time.

I did not know that Xcode would cope with them, but it makes sense that it manages, just as GNU libtool does, to put something appropriate into the ld command line. I have not tried that because our project uses GNU autotools and a makefile build which is fiendishly complex. It involves autoheader and various lisp processing stages as well as conventional compiles. I am just not brave enough to try and move it to the Xcode build system.

This question is more appropriate for one of Apple's Xcode lists.

I cross posted this.

Bill Northcott
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: linking in static libraries under xcode? (From: Bill Northcott <email@hidden>)
 >Re: linking in static libraries under xcode? (From: Shantonu Sen <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.