or as @freddix
You won't be able to do that : let's say your plugins have a function called Init that has to be called in order to init its operation. Now imagine you have two plugins and that you are linking statically both of them how would your code be able to know which Init function you are calling at which time ?
I suspect what you need on the other hand is a way to add/remove plugins just like what was in effect in AMOS with its extensions don't you ? Then you don't need (and must not) to statically link with your plugins as this would then mean they will all be included in your exe and you won't be able to add new ones without recompiling. I guess what you need is a way to open an arbitrary file, check its a plugin of your engine and then activate it in order to be able to use its functionnality, if you are targeting OS4 you can have a look at
this article or as indicated in one comment you can also try to use shared objects for that.
EDIT: turning a static library (.a) into a shared object (.so) is a matter of compilation flags AFAIK, then you'll have to write something remotely semblable to :
handle = dlopen("thisfile.so"); //open the file
myfunc = dlsym(handle, "myfunction"); // look for function named myfunction
if( myfunc )
{
myfunc(<parameters>);
}
else
{
// big error that's not a valide AmiDarkPlugin
}
dlclose(handle);