Question about dynamic and static libraries
Question about dynamic and static libraries
- Subject: Question about dynamic and static libraries
- From: "Brant Sears" <email@hidden>
- Date: Tue, 27 Dec 2005 15:14:55 -0500
- Thread-topic: Question about dynamic and static libraries
I have a library that is being delivered to me as portable source code that I build by doing configure, make, make install. The person who is delivering this library to me has a linux background. I have a Mac background.
The result of this is that I get several versions of the library. There is a .dylib version, a .la version, and a .a version. 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. The "make install" command causes these to be placed into /usr/local/lib
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. Also, I am not sure why there are aliases to the .dylib created.
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.
Thanks. Pointers to correct reading materials with regards to these strange .dylib, .la, etc. phenomenon would also be appreciated.
Brant Sears
<<winmail.dat>>
_______________________________________________
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