[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FFLAGS vs. FCFLAGS



Guy,

> Making `test' in directory /Applications/Absoft/examples/netcdf/src/nf_test
> 
> + f95 -c -w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1 test_get.F
> + f95 -c -w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1 test_put.F
> + f95 -c -w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1 nf_error.F
> + f95 -c -w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1 nf_test.F
> + f95 -c -w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1 test_read.F
> + f95 -c -w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1 test_write.F
> + f95 -c -w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1 util.F
> cc -c -g   -DAbsoftProFortran fortlib.c
> f95 -o nf_test -w -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1   test_get.o 
> test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o fortlib.o 
> ../libsrc/libnetcdf.a -IU77  
> ld: Undefined symbols:
> _getarg_
> _iargc_

This looks like the result of a typo, defining FLIBS='-IU77' instead
of FLIBS='-lU77'.  (In case your font doesn't show it the character
before 'U' is a lower case el, not an upper case eye.)

Also, Ed Hartnett came up with a much simpler solution which works
without even patching the src/fortran/cfortran.h file that comes with
the source.  I recommend using Ed's solution if it works for you:

  .. it compiles and passes all tests on mort, with absoft, with only
  the following environment vars (with compiler in my path):

    CPPFLAGS=-DAbsoftProFortran
    FLIBS=-lU77

  I didn't apply any patches, and all tests passed, so perhaps the other
  environment vars you're using are causing a problem?

That uses version 3.6.1-beta2 from:

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.6.1-beta2.tar.gz

--Russ