Re: Question about dynamic and static libraries
Re: Question about dynamic and static libraries
- Subject: Re: Question about dynamic and static libraries
- From: Art Isbell <email@hidden>
- Date: Tue, 27 Dec 2005 11:02:14 -1000
On Dec 27, 2005, at 10:14 AM, Brant Sears wrote:
Then, there are two alias (or perhaps a symbolic link? I'm not sure
what the difference is.)
files created that are both .dylibs with different names.
An alias is restricted to HFS file systems (i.e., only Macs) whereas
a symbolic link is a Unix file system concept. A symbolic link
points to the path of the original file so that if the original file
is moved, the symbolic link breaks. An alias points to the HFS file
system handle of the original file (not sure of the correct
terminology because I come from a Unix, not a Mac world) so that when
the file is moved, the alias isn't broken. On the flip side, I
believe that an alias would break if the original file were replaced
by a file with an identical path whereas a symbolic link would not.
So they each have their advantages and disadvantages.
I would be very surprised if what you have is an alias.
The "make install" command causes these to be placed into /usr/
local/lib
ls -l should show you the paths to the original files which might
help explain what's going on.
Working with MacOS X for the past couple of years, I do know that
a .a is a static library and that a .dylib is one kind of a dynamic
library. I don't know what a .la is.
A Google search for "file extension" finds http://filext.com/.
Searching that site for the "la" file extension indicates that this
is a GNU libtool library (<http://www.gnu.org/software/libtool/
libtool.html>).
Also, I am not sure why there are aliases to the .dylib created.
Maybe these are pointing to the GNU libtool library which is
described as a platform-independent library script.
Also, I'm noting a weird behavior. When I build my app, it will
link to the .dylib unless I delete the libraries from /usr/local/
lib and copy the .a file into my project. In that case, otool does
not show a dependency on the .dylib. However, if I run the app on a
machine where these files exist in /usr/local/lib, it will use the
version of the library from that directory. Why does this happen?
How can I avoid this? I want it to always use my static library.
Maybe the GNU libtool library is responsible for this behavior. I'm
not familiar with a GNU libtool library, so this is just a guess.
Aloha,
Art
_______________________________________________
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