home *** CD-ROM | disk | FTP | other *** search
- From: acmeyer@hpfcso.FC.HP.COM (Alan C. Meyer)
- Date: Tue, 25 Aug 1992 18:57:58 GMT
- Subject: Re: unresolved references getarg and mclock on HPUX (hp9000/730)
- Message-ID: <9080030@hpfcso.FC.HP.COM>
- Organization: Hewlett-Packard, Fort Collins, CO, USA
- Path: sparky!uunet!usc!sdd.hp.com!hpscdc!hplextra!hpfcso!acmeyer
- Newsgroups: comp.lang.fortran
- References: <6222@lhdsy1.lahabra.chevron.com>
- Lines: 72
-
- In comp.lang.fortran, dfa@lhdsy1.lahabra.chevron.com (D.F. Andersen) writes:
-
- > netters:
- >
- > I give up (sort of :)
- > (email replies will get to me best! thanks!)
- >
- > I need some common UNIX system interface routines to get MCNP
- > working on the hp9000/730
- >
- > My test code is:
- >
- > cat <</EOF >zz.getarg_mclock_link_prob.f
- > c
- > c check out linking problem on hp9000/730,
- > c f77 thiscode.f can't find getarg, mclock
- > c
- > integer getarg
- > integer mclock
- > character*32 arg
- >
- > call getarg(1,arg)
- >
- > call mclock()
- >
- > stop 13
- > end
- > /EOF
-
- Here is some information about MCLOCK. First, your mclock() use of
- mclock above should be as a function ...
-
- > [59] % cat patch.hp700.directives.hp9000x800.1
- > $HP9000_800 INTRINSICS
- > [60] %
- > [60] %
- > [60] % f77 +Q patch.hp700.directives.hp9000x800.1 zz.getarg_mclock.src.f
- > zz.getarg_mclock.src.f:
- > MAIN:
- > /bin/ld: Unsatisfied symbols:
- > mclock (code)
-
- At the next release of the Fortran compiler, MCLOCK will be recognized as
- an "800 intrinsic" - your above example will then work. For now, a workaround
- is given below.
-
- > [64] % nm /usr/lib/libcl.a | fgrep -i clock
- > Symbols from /usr/lib/libcl.a[f_ftnmclock.o]:
- > MCLOCK | 0|extern|entry |$CODE$
- > clock | |undef |code |
- > nm: /usr/lib/libcl.a: no symbols
- > nm: /usr/lib/libcl.a: no symbols
- > [65] %
- >
- >
- > but how do I get to it ??
-
- As you see, the entry in the library is MCLOCK, but the reference in your
- code is to mclock (by default, the compiler downshifts external references).
- One way to access MCLOCK is to use an $ALIAS directive:
-
- $ALIAS mclock="MCLOCK"
- i = mclock()
- ...
-
- This will force the external name of mclock to be MCLOCK and your code
- should link correctly.
-
- Alan Meyer
- Colorado Language Lab
-
- "These are my own opinions ..."
-