linking shared libraries with dependent shared libraries
linking shared libraries with dependent shared libraries
- Subject: linking shared libraries with dependent shared libraries
- From: Paul Forgey <email@hidden>
- Date: Tue, 12 Oct 2004 19:00:28 -0700
I'm trying to port our product to OS X/Darwin. It makes heavy use of
shared libraries and it currently runs on Linux and Windows. On OS X,
I'm using twolevel_namespace.
As the shared libraries are built, they are output into a common
directory across the source tree. This allows the ELF targets to find
dependent shared libraries as needed while either another shared
library or an executable is linked.
e.g.:
shlib1
shlib2
depends on shlib1
exe
depends on shlib2
On OS X, I can't figure out how to get ld to search the same directory
shlib2 was in to find shlib1. With Windows this doesn't matter since
the DLL worries about other dependents at load time. With Linux, ld
searches the same directory.
I know I could work around this by explicitly linking shlib1 to exe.
However, this is very impractical because it would make the build
process very clumsy. Not only would the developer have to play
detective to find out what the entire dependency tree is, but the
entire build tree would have to be gone through if a heavily used
library changed its dependents.
Don't tell me to use frameworks. This isn't a Darwin-only project.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden