[fpc-pascal]Program Functions used in Dynamic Library

Taj Morton taj at wildgardenseed.com
Tue Apr 13 00:01:19 CEST 2004


Hi All,
I'd look this up, but I don't know what to look *for*. I'm trying to write a 
SDK for a plugin system. Plugins are shared "objects"/dynamic linking 
libraries which export two functions, Start and Stop. Start is the programs 
chance to set itsself up, and Stop, destroy its items, etc. Anyway...I'm 
getting sidetracked.

I would like to build the SDK (functions that a plugin is allowed to call, eg 
for setting up GUI, etc) into the main application. That way, all the plugins 
use the same functions, the plugins are small, and don't eat lots of memory.

The advantage to having the SDK built in (that I can see...correct me if I'm 
wrong), is that it can do anything (that FPC allows) to the program, 
*instead* of using shared objects, which seems to have some limitations of 
how it can affect it's host thread.

My question is, I guess, how can I write functions into a program (in a unit), 
and then have dynamic libraries (which can be compiled at a different time 
than the app), call the functions? Some kind of runtime linking?

Many thanks,
-- 
Taj

"Never memorize something that you can look up."
  --Albert Einstein




More information about the fpc-pascal mailing list