| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Fri, 6 Dec 2002, Kevin Van Vechten wrote:
On Friday, December 6, 2002, at 05:58 PM, Justin C. Walker wrote:Unfortunately specifying the full path links the library as an object
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.
which will no doubt make your binary [much] larger than it needs to be.
There are two ways to ensure -lgmp uses the .a library
1) remove the .dylib form. Then the link must use the .a as found
2) specify -static -lgmp
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.