title: Substitute for LD_PRELOAD or LD_LIBRARY_PATH
body: <p>I'm doing some C programming on a machine for which I don't have root access. I've compiled some shared libraries that I'm linking to, but because I cannot install the libraries in the typical location (<code>/usr/local/lib</code>) I have to explicitly specify the location of the libraries each time I compile and run. When compiling, this simply means adding the <code>-L</code> flag to the <code>gcc</code> command, but for program execution it's a lot more annoying. Either I must add the non-standard directory to <code>LD_LIBRARY_PATH</code> in each session, or I must add <code>LD_PRELOAD=/path/to/libs</code> to the beginning of the execute command.</p>
  
  <p>Is there a better way to do this on a machine for which I don't have root access?</p>
  
  <p>BTW, the machine is running Red Hat 4.1.</p>