title: How to obtain the path of a library
body: <p>I can compile my executable file by follow commands</p>
  
  <pre><code>g++ -c main.cpp
  g++ main.o -o my_exe -lmy
  </code></pre>
  
  <p>I do not need to specify the path of the <code>libmy.a</code> using <code>-L path</code> during link.</p>
  
  <p>The <code>libmy.a</code> can automatically find by system.</p>
  
  <p>Now I want to find the path of <code>libmy.a</code> but I have no idea where it is.</p>
  
  <p>How can I obtain the full path of <code>libmy.a</code>? </p>