I would like to display the explicit path to a library which will be used in the linking stage of compilation. I want to do this so that I can add the library as a dependency to a separate object file.
In other words, I often link using:
g++ myFile.cpp -Lsomewhere -Lelse -Lhere -Lthere -lfoo
Is there a way to coerce g++, ld, ldd, or something else to resolve '-lfoo' using the -L's without actually linking anything so that I can use the explicit path as a dependency? For more explicit info, see Makefile Updated Library Dependency.