Feeling foolish now. Turns out that the cause of my problem was upper/lower case. Exported function names are case sensitive, so "ElgCAgSl" is not the same as "ElgCAgsl". (Not catchy names I know, but in the context of a large collection of routines, my use of upper/lower case is intended to be fairy meaningful.) I I did know that of course, having learnt the hard way a good few years ago, but did not pay enough attention to it. Using dependencywalker helped to spot this. Always mortifying to make this kind of elementary error, despite many years of experience.
Alternatively I could have a rant about the idiocy of making names case-sensitive, a recipe for problems if ever there was one!