Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:3311] RE: load_opcodes.c

Date2003-11-07 11:55
From"Michael Gogins"
Subject[CSOUND-DEV:3311] RE: load_opcodes.c
What you are suggesting is exactly what I had in mind when I created these
functions. I just don't have a Mac so I couldn't do it myself.

============================================
Michael Gogins
gogins at pipeline period com
Irreducible Productions
Silence, a language for programming music and sound
Available at http://sourceforge.net/projects/silencevst/
============================================


----- Original Message ----- 
From: "stevenyi" 
To: "Csound Developers Discussion List" 
Sent: Friday, November 07, 2003 12:27 AM
Subject: [CSOUND-DEV:3309] RE: load_opcodes.c


> Okay, after brushing up a bit with the Apple developer docs, I think I
> understand the situation with the load_opcodes.c a bit better.
>
> Mac has two types of libraries which they prefer to call bundles (they
> also have Frameworks, which are shared-libs bundled together with header
> files and docs, and Umbrella Frameworks, which are like bundles of
> bundles... yikes.)  Carbon (cfm) bundles which are OS9 style, and Mach-O
> which are OSX style (they end in .dylib).  Working with .dylibs is
> largely similar to working with linux .so's (they're built with gnu
> tools, granted, altered by Mac so that they behave *almost* like gnu
> stuff would on other platforms... another yikes), but the functions for
> loading .dylib's differ from BSD dlopen and dlsym.  (There's more
> functions for working with libraries).
>
>
http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORuntime/2rt_mach-o_overview/index.html
>
> has the Overview information about Mach-O, as well as API reference for
> dynamic linking functions for dylib loading and symbol lookup.
>
> Now, the code from John ffitch and the dlcompat library from opendarwin
> are pretty much the same thing in that they wrap all of the Apple
> library loading functions to function like BSD dlopen, dlsym, dlerror.
> The dlcompat library, if I read correctly, used to be part of fink,
> which is a system to help port linux apps over to OSX.  So, both the
> code from John ffitch and dlcompat would be used to wrap the Apple
> mach-o functions so that they can be loaded in a BSD/linux fashion.
>
> However, after figuring this all out, it seems that to be more
> architecturally clean, it would be better to instead of using the dl-
> wrappers would be to implement the csoundLoadLibrary,
> csoundCloseLibrary, and csoundGetLibrarySymbol directly for MACOSX,
> instead of reusing the Linux implementation of those functions. This
> would be for architectural clarity.  It'd probably be easier to use the
> dlcompat stuff or figure out what's not working from what I copied over
> from John's file.
>
> Either way, reading through Apple's maze of Mach-O documentation has
> gotten me quite spun around.  Will have to give it another go tomorrow
> or on the weekend!
>
> steven
>
>
>
> On Thu, 2003-11-06 at 17:58, Michael Gogins wrote:
> > I'm sorry, but I have only a little idea what you are saying means -
what is
> > the relation of the cmf stuff and mach-o stuff to BSD dlopen and dlsym?
>