[gmpi] Re: low level API - Abstract Factory summary

  • From: Paul Davis <paul@xxxxxxxxxxxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Mon, 07 Feb 2005 20:47:59 -0500

>When you load a plugin on Linux, you use the function dlsym() to locate 
>the plugin's entry point (e.g. "ladspa_descriptor" ).
>When you compile the plugin, how do you specify that that symbol is 
>'exported', visible from the 'outside'.

you use standard C conventions:

all functions and data marked static are local to the module being
loaded, everything else is (potentially) global. OSX is the same, i
believe. for some reasons, windows took the opposite approach - stuff
is not globally visible unless marked. i have no idea why this
decision was made.

the one wrinkle in all this is that when loading a shared object, you
can specify either full run-time link resolution at load time, or make
linkage resolution "lazy". the former will do all the checks that a
static linker would have done at link time, and if it fails, you can't
load the object. the latter defers a lot of stuff until its needed, so
you can load the object but you might run into failures later. this is
controlled by flags passed to dlopen().


Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: