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: Building static



On Friday, December 6, 2002, at 05:58 PM, Justin C. Walker wrote:

I want to build an app that is dependent only on the dylibs that "come with" Mac OS X, so Joe Random can just download this thing and run it on his system without having to worry about finding/building the other libraries that it (the app) uses.

A noble pursuit. =)

I have this building fine, but for one library. That library (gmp) comes in both .dylib and .a forms. How can I force it to use the .a version? As it stands, the app seems to have a predilection for the .dylib. Just to make life more interesting, one of the other (static) libraries depends on gmp. Does this mean I have to rebuild that library first, in some different way than I've done so far?

I assume you're linking with the -lgmp flag. I'm not sure how to force -l to use the static library, however, specifying an absolute path to the static library works. So try /path/to/libgmp.a instead of -lgmp. I doubt you'll need to rebuild the first library.

-Kevin
_______________________________________________
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: 
 >Building static (From: "Justin C. Walker" <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.