The order of the libraries on the command line is significant.
If library libfoo.a has an undefined symbol, and that symbol is in libbar.a, you need to put libfoo.a before libbar.a on the command line.
If you have a situation where libfoo.a is dependent on libbar.a, and libbar.a is dependent on libfoo.a, you'll need to specify them twice: libfoo.a libbar.a libfoo.a. Generally, it's recommended that you don't have interdependencies like that.
HTH, --Eljay