For example, If my c++ code included
math.h so that I can use
When I compile my code, I need to add the linker, that is :
g++ main.cpp -lm
So my question is: Is there any way in which I don't need to add the
Secondly, the simple answer to your question is no, there isn't a way to avoid needing to specify that - if you use routines from a library other than the main C library then you need to tell the compiler that so it knows where to find the routines.
You could consider using