Hello, I'd like to ask for advice on library dependencies and the --as-needed linker flag in the GSL project (GNU Scientific Library).
Our main lib file needs to call an external library (BLAS) for vector operations. We want people to be able to choose different BLAS libraries when they link their applications, e.g. $ gcc main.c -lgsl -lcblas -lm # "cblas" can be ATLAS, Intel, AMD, etc Thefore we don't specify any dependency on the external BLAS with libtool, since its location would get hard-coded in the GSL shared library. This works fine except when the user links their application --as-needed, which misses the BLAS functions as they are only used in libgsl.so and (typically) not in the user's object file. Is there a recommended way to handle this situation? It seems like it would work if the search with --as-needed was recursive, is there any conceptual reason for it not to do that? Thanks. -- Brian Gough (GSL Maintainer) _______________________________________________ Bug-gsl mailing list Bug-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gsl