where are dynamically linked libraries?

lethe

Registered
i was just wondering. i m used to having to specify my location for dynamically linkable libraries sometimes in UNIX apps, or specifying them in /etc/ld.so.conf. and it seems like you can t help put trip over .DLL in every directory of any windows filesystem.

but i have no idea where MacOSX or earlier MacOS keep their libraries. i mean, there is some stuff in /usr/lib on OSX, but i assume that is for UNIX apps. how about aqua apps? do they ever install libraries? and how about classic macos?

just curious
 
Well, to be perfectly honest, I can't tell you much about the Mac OS X libraries, but I'll take a shot at the OS 9 and earlier ones...

The core system software of Mac OS 9 earlier is in the files Finder, System, ROM, and maybe a few other things. However, if you look in your "Extensions" folder in your system folder, you'll find not only Extensions (files which add extended capibilites to your Mac- drivers and such) but also libraries..... they all end with the word "Library" or just "Lib". Here's some I found in my Extensions folder...

OpenGLLibrary
NSL UI Library
NetSprocketLib
MRJ Libraries
Microsoft Internet Library
IrDALib
File Sharing Library
EnetShimLib
DVDRuntimeLib
DrawSprocketLib
HTMLRenderingLib
CarbonLib

my favorite...

ReadBooksAtThePublicLib

.... alright, that last one was a joke. Sosumi.
 
During the link process of the build, the
linker builds in the path to the libraries
(or you can force certain ones).

Under OSX, they can live in a range of places
and it seems Frameworks are glorified
shared libraries (no, I'm not a Aqua programmer).

[localhost:Foundation.framework/Versions/C] howardm% ls
Foundation* Foundation_profile* Headers/ Resources/
[localhost:Foundation.framework/Versions/C] howardm% file *
Foundation: Mach-O dynamically linked shared library ppc
Foundation_profile: Mach-O dynamically linked shared library ppc

If you look at the applications w/ 'otool', you
can see what libraries get called.


For example:
[localhost:Foundation.framework/Versions/C] howardm% otool -L ~/Desktop/CodeTek\ VirtualDesktop.app/Contents/MacOS/CodeTek\ VirtualDesktop
/Users/howardm/Desktop/CodeTek VirtualDesktop.app/Contents/MacOS/CodeTek VirtualDesktop:
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 122.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 227.3.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 16.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 7.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 55.0.0)

I'd much rahter have them the way Unix/OSX does it than the friggin DLL hell
of MS crap.
 
Back
Top