home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / fortran / 3177 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  2.3 KB

  1. From: acmeyer@hpfcso.FC.HP.COM (Alan C. Meyer)
  2. Date: Tue, 25 Aug 1992 18:57:58 GMT
  3. Subject: Re: unresolved references getarg and mclock on HPUX (hp9000/730)
  4. Message-ID: <9080030@hpfcso.FC.HP.COM>
  5. Organization: Hewlett-Packard, Fort Collins, CO, USA
  6. Path: sparky!uunet!usc!sdd.hp.com!hpscdc!hplextra!hpfcso!acmeyer
  7. Newsgroups: comp.lang.fortran
  8. References: <6222@lhdsy1.lahabra.chevron.com>
  9. Lines: 72
  10.  
  11. In comp.lang.fortran, dfa@lhdsy1.lahabra.chevron.com (D.F. Andersen) writes:
  12.  
  13. > netters:
  14. > I give up (sort of :)
  15. > (email replies will get to me best!  thanks!)
  16. > I need some common UNIX system interface routines to get MCNP
  17. > working on the hp9000/730
  18. > My test code is:
  19. >  cat <</EOF  >zz.getarg_mclock_link_prob.f
  20. >  c
  21. >  c   check out linking problem on hp9000/730,
  22. >  c   f77  thiscode.f   can't find getarg, mclock
  23. >  c
  24. >         integer getarg
  25. >         integer mclock
  26. >         character*32   arg
  27. >         call  getarg(1,arg)
  28. >         call  mclock()
  29. >         stop 13
  30. >         end
  31. >  /EOF
  32.  
  33. Here is some information about MCLOCK.  First, your mclock() use of
  34. mclock above should be as a function ...
  35.  
  36. >    [59] % cat patch.hp700.directives.hp9000x800.1
  37. >    $HP9000_800 INTRINSICS
  38. >    [60] %
  39. >    [60] %
  40. >    [60] % f77 +Q patch.hp700.directives.hp9000x800.1   zz.getarg_mclock.src.f
  41. >    zz.getarg_mclock.src.f:
  42. >       MAIN:
  43. >    /bin/ld: Unsatisfied symbols:
  44. >       mclock (code)
  45.  
  46. At the next release of the Fortran compiler, MCLOCK will be recognized as
  47. an "800 intrinsic" - your above example will then work.  For now, a workaround
  48. is given below.
  49.  
  50. >    [64] % nm /usr/lib/libcl.a | fgrep -i clock
  51. >    Symbols from /usr/lib/libcl.a[f_ftnmclock.o]:
  52. >    MCLOCK              |         0|extern|entry  |$CODE$
  53. >    clock               |          |undef |code   |
  54. >    nm:  /usr/lib/libcl.a:  no symbols
  55. >    nm:  /usr/lib/libcl.a:  no symbols
  56. >    [65] %
  57. > but how do I get to it ??
  58.  
  59. As you see, the entry in the library is MCLOCK, but the reference in your
  60. code is to mclock (by default, the compiler downshifts external references).
  61. One way to access MCLOCK is to use an $ALIAS directive:
  62.  
  63.     $ALIAS mclock="MCLOCK"
  64.         i = mclock()
  65.         ...
  66.  
  67. This will force the external name of mclock to be MCLOCK and your code
  68. should link correctly.
  69.  
  70. Alan Meyer
  71. Colorado Language Lab
  72.  
  73. "These are my own opinions ..."
  74.