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: dylib or Framework?




On Mar 20, 2005, at 5:46 PM, Michael B Allen wrote:

I have a library of generic C modules (e.g. hashmap, allocator, csv
parser, etc) [1] that I have ported to OS X. At least it compiles cleanly.
Now I need to figure out how to package it. My question is - should I
create a Framework or just a standard UNIX style shared library to go in
/usr/lib?


In either case I'm just using a straight forward Makefile at this point.
My code is just POSIX level stuff (mostly ANSI C actually). Can someone
provide a pointer to a Makefile that illustrates how to correctly build a
dylib and/or Framework?

dylibs are easy; pretty similar to shared libraries on other platforms. Use 'libtool', 'ld -dylib', or 'gcc -nostartfiles -Wl,-dylib' to make the library.


I can't help with Frameworks; whether you should make one or not probably depends on your target audience. If you're targeting other Unix-app porters, might as well stick with /usr/local/include and /usr/local/lib. If you're targeting people using XCode, etc, a Framework is probably a good idea.

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

This email sent to email@hidden
References: 
 >dylib or Framework? (From: "Michael B Allen" <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.