Ron, i’m not familiar with any ld options that can eliminate the multiple lib references under linux but that doesn’t mean they don’t exist. Again, its my major frustration with using static libs on Linux. I don’t use Mac’s but had read somewhere that you coudn’t use static libs but that appears to be wrong. One thing I do is compile everything with -fPIC so I can also build both static and dynamic libs without doing a second compile just for dynamic libs. Since most of my codes have different parts of the code in separate subdirectories based on what they do (matrix utils in one dir, IO utils in another etc) I will also build a separate library for each subdir and then merge them into one library. This is all done with hand woven make files using procedures I adopted about 25 years ago. If someone else has any advice about how to avoid the multiple lib references when linking under Linux I would also like to know.
Shared libraries can be convenient for large projects but I think that static libraries might be better for small projects.
With experience, I tend to prefer static libraries for my projects but it is not always possible.
I get all the benefits of dynamic linking. But for a end user who has never heard of the word fortran
, none of the benefits matter as long as the developers can bypass the dependency hell on their behalf with static linking.