Re: linking in private non-Framework libraries
Re: linking in private non-Framework libraries
- Subject: Re: linking in private non-Framework libraries
- From: Glenn Howes <email@hidden>
- Date: Sun, 29 Sep 2002 22:59:42 -0700
Unfortunately, it doesn't work. I thought it had, but that turned out
to be untrue.
I'll restate my problem. I'm trying to use a generic library (the
Berkeley DB 4.0) which I've downloaded from sleepycat.com. I've run the
configure utility and done the make and the install, and this results
in a set of libraries: libdb-4.0.a, libdb-4.0.dylib and libdb-4.0.la
being placed in my /usr/local/BerkeleyDB.4.0/lib directory. I'm showing
my ignorance here, but I take it the .a file is a static library, the
.dylib is a shared library and I don't know what the .la file is. I can
drop either the .a file or the .dylib into my project and access the
routines encapsulated within and have been doing so for months.
Now I'm trying to distribute my application and of course anybody
trying to use the beta can't because it isn't linked into the package.
So the app refuses to start up and the console shows an error about not
being able to find the DB library in wherever it was when it was
dropped in.
So I tried all sorts of things here, including the suggestion below,
and would like to get this working as I'm going to be driving home to
Minnesota (from CA) in the next few days so I want to fix this as soon
as possible. It doesn't seem practical to try to do anything with the
DB source, as the installation configuration and make file is
incredibly complicated.
On Sunday, September 29, 2002, at 01:28 PM, Drew McCormack wrote:
Simply choose "Add Frameworks..." from the "Project" menu, and select
your static library files to add to the project.
I think you also have to click the "Target" tab, open "Build Phases",
and click on "Frameworks & Libraries". If your libraries are not in
the table there, you need to drag them from under the "Files" tab,
into the "Frameworks & Libraries" table. Then it should work.
Drew
On Sunday, September 29, 2002, at 09:09 PM, Glenn Howes wrote:
Hello,
Following up on my "private Frameworks - how" question of the
other day, I am trying to link the Berkeley DB libraries into my
application without having to install it separately. I guess that I
want Project Builder to tell the linker to statically link the static
version of the DB library "libdb-4.0.a" directly into my executable
to make one big monolithic executable but I'm ignorant of how to do
this. I would have thought it a simple matter of dragging the file
from the finder into the Project Builder window, however this only
makes a linkage with the dynamic library in my
"/usr/local/BerkeleyDB.4.0" directory. Obviously, most of my users
will not have such a directory.
Alternatively, perhaps there is a sub-folder like the private
"Frameworks" directory into which dyld could find the library inside
my app package.
And perhaps there is something to be done with libtool.
As you can see, I'm quite confused.
--glenn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.