title: Linking C library with non-standard name
body: <p>I am using gcc to compile a program which I need to link to a C library with non-standard name; it is called <code>stuff.a</code> instead of <code>libstuff.a</code>. </p>
  
  <p>I cannot change the name of the file (permission issues).</p>
  
  <p>I don't want to include the full library (i.e. using <code>gcc program.c stuff.a -oprogram</code>)</p>
  
  <p>I want to compile as <code>gcc program.c -L/path/to/library/ -lstuff -oprogram</code> but gcc will not find the library (because it is not called <code>libstuff.a</code>).</p>
  
  <p>I am working on a Linux box.</p>
  
  <p>How can I get the (dynamic) linking done?</p>
  
  <p>EDIT:</p>
  
  <p>Thank you all, and my apologies for a poorly worded question.</p>
  
  <p>I did not even have a shared object (I thought I could link dynamically to an *.a file), so this confused many of you. Again, apologies for my ignorance.</p>
  
  <p>What I ended up doing is creating the shared object in a local directory, appending the location to my LD_LIBRARY_PATH environment variable, and linking again.</p>
  
  <p>It works like a charm (from 1.3M executable down to 5.8K).</p>
  
  <p>Thanks again.</p>