I've got a little project I'm working on that could benifit from being able to
drop in third-party extensions as plug-ins. I understand the plug-in theory,
more or less, but I'm fuzzy on the implementation details. I was hoping someone
could help me out a bit.
As I understand it (and please correct me if I'm wrong), if I create a function
library and compile it as a static object then I have to compile the final app
along with that object. If I make my library a shared object than I just have to
link against it at compile time and it's included at run-time (I've never made
any of my own so's - do you have to do anything different than what you'd do for
a static object?).
But what if I want to create a library that I can just drop into an app without
having to recompile against it (such as a netscape-style plug-in)? Obviously
there has to be some agreed-upon api so the app knows what entry points exist in
the library and the library knows what functions the app exposes, but how does
the app actually 'load' the library while it's running?
I noticed some functions for loading dynamic modules in a glib reference and this
seems like it would be a place to start, but once I've loaded the module is there
anything special I have to do to call it's functions or do they just magically
become available? This is the part where I'm getting lost...
If anyone can point me to a good online resource for this or drop me a basic
explanation, I'd be grateful. I've looked over netscape's plug-in docs but that
mostly concentrates on the api side of things. I spent some time digging through
the gimp source but gimp plug-ins appear to run as a separate process which isn't
really the behavior I'm after (I could probably still do what I want that way,
but I need to get a handle on this whole library thing anyway ;).
thanks in advance,
e
--
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| Ethan VonderWeid IT Technical Operations |
| (650) 336-0534 (internal x60534) This space for rent |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+