title: fortran undefined reference to lnblnk getpid dtime etime
body: <p>I am trying to port some old fortran code.  It will compile without error, and without warnings, using the Intel compiler ifort.
  When I try to use gfortran, specifically 4.3.4 and gfortran-4.8, I receive errors for undefined reference for the functions LNBLNK_ GETPID_ DTIME_ and ETIME_.
  I google this problem and it seems like LNBLNK is supposed to be an intrinsic function for gfortran.  Anyone know a way around this problem?</p>
  
  <p>I suppose i can write my own LNBLNK function since it's simple.  For ETIME and DTIME I could comment those out they are not a necessity, but GETPID I do need.</p>
  
  <p>edit:  i am compiling over 100 files together on a single <code>gfortran-4.8</code> command.  I edited only those files that had <code>LNBLNK</code> mentioned as undefined reference and replaced it with <code>LEN_TRIM</code>.  This solved those undefined reference errors, however if i do a <code>grep</code> on all the files being compiled I see at least 10 others still using <code>LNBLNK</code> and it is successfully compiling past this specific <code>undefined reference to LNKBLNK</code> error.
  what would cause this?
  could this be a bug with gfortran?</p>
  
  <p>edit #2</p>
  
  <p>it seems code like this works:  <code>WRITE(6,*) mystring(1:LNBLNK(mystring))</code></p>
  
  <p>however any files that use the <code>LNBLNK</code> command like this below result in the compiler error:</p>
  
  <pre><code>INTEGER LNBLNK
  EXTERNAL LNBLNK
  INTEGER POS
  
  POS = LNBLNK( mystring )
  </code></pre>
  
  <p>it results in this specific compiler error</p>
  
  <pre><code>/tmp/ccsdBgxK.o: In function `whatever_':
  whatever.f:(.text+0x38d): undefined reference to `lnblnk_'
  </code></pre>