Report question

Question: Is there an intelligent way to know the name of the library to link to at compile time? (Linux/Kubuntu)