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

Re: netcdf and compilers



>Organization: DOE
>Keywords: 199404262227.AA05254 netCDF MS-DOS Fortran C
>Date: Tue, 26 Apr 1994 18:26:59 -0400 (EDT)
>Subject: Re: netcdf and compilers 

Jim,

>I have rebuilt the Fortran and C libraries as instructed.  This did
>eliminate one of the two errors.  I have included the following 
>output log of the final error.  Any help would be appreciated.

>=====================================================
>
>Microsoft (R) Segmented-Executable Linker  Version 5.01.21
>Copyright (C) Microsoft Corp 1984-1988.  All rights reserved.
>
>Object Modules [.OBJ]: JIM.OBJ+C:\NETCDF\FSLEN.OBJ+C:\NETCDF\JACKETS.OBJ
>Run File [JIM.EXE]: 
>List File [NUL.MAP]: 
>Libraries [.LIB]: C:\FORV41\LIB\LLIBFORE.LIB+C:\CV51\LIB\LLIBCE.LIB+C:\NETCDF\
> XDR.LIB+C:\NETCDF\NETCDF.LIB;
>
>LINK : error L2029: Unresolved externals:
>
>__aFchkstk in file(s):
> C:\NETCDF\XDR.LIB(byteordr.c) C:\NETCDF\XDR.LIB(xdrfloat.c)
>C:\NETCDF\XDR.LIB(xdr.c) C:\NETCDF\NETCDF.LIB(xdrposix.c)
>C:\NETCDF\NETCDF.LIB(string.c) C:\NETCDF\NETCDF.LIB(sharray.c)
>C:\NETCDF\NETCDF.LIB(iarray.c) C:\NETCDF\NETCDF.LIB(var.c)
>C:\NETCDF\NETC DF.LIB(putget.c) C:\NETCDF\NETCDF.LIB(file.c)
>C:\NETCDF\NETCDF.LIB(error.c) C:\NETCDF\NETCDF.LIB(dim.c)
>C:\NETCDF\NETCDF.LIB(cdf.c) C:\NETCDF\NETCDF.LIB(attr.c)
>C:\NETCDF\NETCDF.LIB(array.c) C:\NETCDF\JACKETS.OBJ(jackets.c)
>
>There was 1 error detected

The __aFchkstk entry point should be in your Fortran library.  I suggest that
you do the following to verify whether or not it is:

LIB LLIBFOR7.LIB,LLIBFOR7.LST;

Edit LLIBFOR7.LST and look for __Fchkstk.  I just:

o built the Microsoft Fortran 5.0 emulator and 80387 libraries on a PC running
  MS-DOS 6.2
o specified to NOT include C compatibility (the default when running the
  SETUP program)
o ran LIB as illustrated above
o found __Fchkstk as I expected

I reviewed your last message and see that you are, in fact, using MS Fortran
4.1.  If you do not find the __Fchkstk entry point in the 4.1 Fortran library
(I seem to remember that this entry point is only available in Versions 5.x,
but this memory is now over 4 years old), then you will have to either upgrade 
to using Version 5.1 (which I STRONGLY recommend) or you will have to figure 
out how Fortran 4.1 gets the information on how long strings (character arrays)
are in subroutine calls.  This is what I did to develop the object module
FSLEN.OBJ for Fortran 5.0 and 5.1.  The procedure is not hard, but it is
a little convoluted.  You have to write a simple Fortran program that passes
a character array to a Fortran subroutine.  The compiler has a flag to will
enable output of an assembly code listing of the program.  From that listing,
you have to figure out how MS Fortran 4.1 figures out the length of character
arrays and incorporate it into a replacement for FSLEN.  I STRONGLY recommend 
that you upgrade to Fortran 5.1.

I reviewed our README file in the FTP pub/netcdf/msdos directory and found 
that it failed to warn prospective users of the need to have current versions 
of the Fortran and C compilers.  We just modified this file to include 
appropriate information for new users.

Sorry for the tardiness of my reply...

Tom Yoksas