In all of my cases, I have needed to write some special wrappers to implement the interface to my software package. The software I am using cannot call the third-party libraries directly, since the arguments need some manipulation by simple wrappers. Hence, my software actually calls my custom wrappers, and its the wrappers that call the third-party libraries.
Each time I have had to do this it has taken several days to get all the kinks ironed out. So I am posting my findings here in case it is of use to future developers.
I wrote a file called wrappers.c which contains my special-purpose wrappers to the third-party library.
In each case below, all the dependencies created in wrappers.c were automagicly resolved by the ld command, and a large *.so library was created which contained all the code necessary to provide the functions I needed.
The commands I needed to create my *.so plug-in were like:
gcc -c -fpic wrappers.c ld -shared -o libMyPlugin.so wrappers.o -l3rdParty
gcc -c -fpic wrappers.c ld -G -o libMyPlugin.so wrappers.o -l3rdPartyWhere -l3rdParty refers to the archive library, lib3rdParty.a which is searched to resolve all undefined functions called from wrappers.c