whereis: locate the binary, source, and manual page files for a command
ldd: print shared library dependencies
you may see the undefined symbols on the *.a with a `nm' command
nm: list symbols from object files
now, to know where (in which .a those symbols are defined) I don't have a good answer.
You could traverse all the .a in the directory and perform a nm | grep to see if they define the symbol
1 2 3 4 5 6
//not tested
for K in *.a; doif nm "$K" | grep "a symbol that I need" | grep "T"; then
echo "may be here $K"
fi
done
Or you could better use pkg-config to manage such dependencies. It would look on files the order and which libraries you need to link against