.lib files are likely for Windows. .a files are static archives and not dynamically loaded objects. Try referring to them directly without the -l prefix and provide full name including the extension. Be careful, if the libraries depend on each other then the order of passing them to the compiler matters!