This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Glenn, On Wed, 26 Nov 1997, Glenn P. Davis wrote: > > So now 'make' seems to work ok. Then 'make test' runs two C tests ok, but > > then fails as follows in directory src/fortran: > > > > f77 -o ftest -float0 -ew ftest.o ../libsrc/libnetcdf.a > > undefined first referenced > > symbol in file > > nf_get_varm_int2_ ftest.o > > nf_get_varm_int1_ ftest.o > > nf_get_vars_int2_ ftest.o > > nf_get_vars_int1_ ftest.o > > nf_get_vara_int2_ ftest.o > > nf_get_vara_int1_ ftest.o > > nf_get_var1_int2_ ftest.o > > nf_get_var1_int1_ ftest.o > > nf_get_var_int2_ ftest.o > > nf_get_var_int1_ ftest.o > > nf_get_att_int2_ ftest.o > > nf_get_att_int1_ ftest.o > > nf_put_varm_int2_ ftest.o > > nf_put_varm_int1_ ftest.o > > nf_put_vars_int2_ ftest.o > > nf_put_vars_int1_ ftest.o > > nf_put_vara_int2_ ftest.o > > nf_put_vara_int1_ ftest.o > > nf_put_var1_int2_ ftest.o > > nf_put_var1_int1_ ftest.o > > nf_put_var_int2_ ftest.o > > nf_put_var_int1_ ftest.o > > nf_put_att_int2_ ftest.o > > nf_put_att_int1_ ftest.o > > ld fatal: symbol referencing errors. no output written to file ftest. > > f77 fatal : ld command error : 13 > > > > I suspect these entry points are not needed, but they cause linkinf to fail. > > ftest tests the version 2 compatibility interface (fort-v2compat.c). > I haven't seen this problem. I used FC=f90, not f77. I tried FC=f90, which did solve above problem linking ftest in src/fortran. However ftest produced following: ./ftest *** Testing nccre ... *** Testing ncddef ... *** Testing ncvdef ... *** Testing ncapt, ncaptc ... *** Testing ncclos ... *** Testing ncvpt1 ... *** Testing ncvgt1 ... error in ncvgt1 byte: 0 .ne. 122 error in ncvgt1 short: 0 .ne. 10 error in ncvgt1 long: 0 .ne. 1000 error in ncvgt 1 float: 0.000000000000000E+00 not close to 3.141590000000000 error in ncvgt1 double: 0.000000000000000E+00 not close to 0.3333333333000000 error in ncvg1c *** Testing ncvpt ... *** Testing ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq ... error in ncinq or ncddef error in ncinq or ncvdef error in ncinq or ncapt error: bad recdim from ncinq *** Testing ncvgt, ncvgtc ... *** Testing ncagt, ncagtc ... *** Testing ncredf, ncdren, ncvren, ncaren, ncendf ... error in ncinq or ncddef error in ncinq or ncvdef error in ncinq or ncapt error: bad recdim from ncinq *** Testing ncacpy ... *** Testing ncadel ... *** Testing fill values ... error in byte fill value error in double fill value error in float fill value error in long fill value error in short fill value > Is it possible that ftest.o or fort-v2compat.o were left over from a > previous build attempt? No. > Does 'make test' in nf_test/ fail as well? Yes. In fact even using f90, linking still fails for nf_test in similar way to that in which ftest link failed before. The output is: undefined first referenced symbol in file nf_get_var1_int1_ test_get.o nf_get_var1_int2_ test_get.o nf_get_var_int1_ test_get.o nf_get_var_int2_ test_get.o nf_get_vara_int1_ test_get.o nf_get_vara_int2_ test_get.o nf_get_vars_int1_ test_get.o nf_get_vars_int2_ test_get.o nf_get_varm_int1_ test_get.o nf_get_varm_int2_ test_get.o nf_get_att_int1_ test_get.o nf_get_att_int2_ test_get.o nf_put_var1_int1_ test_put.o nf_put_var1_int2_ test_put.o nf_put_var_int1_ test_put.o nf_put_var_int2_ test_put.o nf_put_vara_int1_ test_put.o nf_put_vara_int2_ test_put.o nf_put_vars_int1_ test_put.o nf_put_vars_int2_ test_put.o nf_put_varm_int1_ test_put.o nf_put_varm_int2_ test_put.o nf_put_att_int1_ test_put.o nf_put_att_int2_ test_put.o ld fatal: symbol referencing errors. no output written to file nf_test. f90 fatal : ld command error : 13 Thanks again for your help. We seem to be making some progress, even if rather slowly! Harvey Harvey Davies, CSIRO Mathematical and Information Sciences, Email: address@hidden Phone: +61 3 9669 8110 or +61 3 9239 4556 Fax: +61 3 9669 8112