Re: XCode project, ./configure, make and building framework?
Re: XCode project, ./configure, make and building framework?
- Subject: Re: XCode project, ./configure, make and building framework?
- From: Karin Kosina <email@hidden>
- Date: Sat, 2 Oct 2004 12:20:25 +0200
On Sat, 2 Oct 2004 11:12:25 +0200, Ringo De Smet <email@hidden> wrote:
> If the ./configure and make steps deliver a dylib, can I just rename
> this file without the dylib extension and copy this into the framework
> folder structure along with the headers and resources?
Yes. Sort of. But it's not quite this easy.
What you have to keep in mind is that what really counts is the
install_name that is hardcoded into the binary - it will not be enough
to just rename the file itself.
We are actually doing this in a project I'm working on (a
cross-platform 3D library called Coin, which ends up being installed
as Inventor.framework for compatibility reasons): We create the
framework structure manually, put the actual library built by libtool
into $FRAMEWORK_ROOT/Versions/$VERSIONNUMBER/Libraries/ and make a
symlink from the toplevel. (If you want the gory details, feel free to
take a look at the Makefile.am[*] - search for framework and you'll
see.)
More concretely, this is what we end up with:
$ ls /Library/Frameworks/Inventor.framework/Versions/C/Libraries/*
/Library/Frameworks/Inventor.framework/Versions/C/Libraries/libCoin.60.0.0.dylib
/Library/Frameworks/Inventor.framework/Versions/C/Libraries/libCoin.60.dylib
/Library/Frameworks/Inventor.framework/Versions/C/Libraries/libCoin.dylib
$ ls -l /Library/Frameworks/Inventor.framework.disabled/Inventor
lrwxr-xr-x 1 root wheel 4 23 Sep 22:26
/Library/Frameworks/Inventor.framework/Inventor ->
Versions/Current/Libraries/libCoin.dylib
Again, it's important that the install_path is correct. So either you
have to do what we do (make libtool build the library with the
install_path set to /Library/Frameworks/....) or manually set it using
the install_name_tool.
You'll also need an Info.plist and version.plist file to go into the
frameworks Resources/ directory, but these you can easily create on
your own.
[*] http://www.coin3d.org/source/*checkout*/src/Makefile.am?rev=1.16
> Or is there
> still a difference in binary between a shared lib as a framework and a
> BSD level shared library?
Well, there is a very fundamental difference, but it does not hit you
in this case. :)
On ELF systems (regular BSDs) shared libraries and dynamically
loadable modules are the same: You can load a .so dynamically, or link
against it as a library. In the Mach-O world, there's a distinction
between shared libs (.dylib) -- which you link against using -lfoo --
and loadable modules (.bundle, or whatever) -- which you dlopen() at
runtime (actually our mechanism is dyld, but you get the picture).
Anyway, your shared library should be a shared library, which is the
same kind of object code that you have in frameworks. :) Unless
somebody seriously screwed up your libtool configuration, that is. :)
HTH, =/~ kyrah
--
We are Elektropeople for a better living.
Karin Kosina, KSC (vka kyrah)
http://kyrah.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden