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

Re: 951206: NetCDF build trouble on PC



>Organization: USDA-ARS
>Keywords: 199512061814.AA15810

Hi John,

>              I am with USDA-ARS developing a public domain
>           watershed-based physical process model to simulate non-point
>           source pollution from continuous runoff events (or AGNPS for
>           short).  The above probably doesn't concern you, but one of
>           our requirments is to read NetCDF input/output.  We are
>           using a PC developement environment but are targeting both
>           PC's and Unix Operating Sys's.  To make it more interesting,
>           we are required to do this using the Fortran programming
>           language with a subset of the Fortran 90 enhancements.  Our
>           Fortran development tools include: MS Fortran Powerstation
>           version 1.0a, MS Fortran Powerstation version 4.0, and Lahey
>           Fortran 90.  My experience is in Borland C++ (while not
>           using the object features very much), so I am climbing a
>           steep learning curve on this project.

To build the Fortran interface to the netCDF library from the sources, you
must also have a C compiler, because the majority of the netCDF library is
written in C.  The Fortran library interface is just a thin layer that makes
the library appear to follow Fortran conventions for indexing and dimension
order, but does most of the work by calling the underlying C library.

>              I have downloaded most of your literature on NetCDF as
>           well as the software for version 2.3.2.  In going through
>           your install document, I skipped ahead (as directed) to the
>           DOS section and implemented steps 1 and 2.  Step 3 deals
>           with OS/2, and now I am having problems with step 4.

You might have better luck with the netcdf 2.4 beta release, available from

    ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-2.4-beta.tar.Z

if you're using Windows NT.  Otherwise, if you can wait a month or two, we
will have finished the port of netCDF 2.4 to MSDOS, OS/2, Windows NT, VMS,
etc.  But I'll assume you need to get netcdf 2.3.2 built now ...

>              I am using the NMAKE utility from MS Fortran Powerstation
>           1.0c.  I have tried several procdures, some of which I will
>           list:
> 
>           C:\NETCDF23\NMAKE all --> This returns the following
>                                     recursive message:
>                   ""
>                   Invalid Keyword -= 'echo
>                   Bad Command or File Name
>                   Bad Command or File Name
>                   ""
>                   "Returning to Directory 'pwd'"
>                   ""
> 
>                                 --> I get the same results from NMAKE
>                                     test and NMAKE install.

It looks like NMAKE was trying to use a UNIX Makefile.  You need to instruct
NMAKE to use the msoft.mk file supplied for this purpose, probably with
something like
     NMAKE -f msoft.mk
or
     NMAKE /F=msoft.mk
or whatever.  I'm not familiar with NMAKE's invocation, so you'll have to
look up how to get it to use a specified Makefile.  You might also just try
copying all the msoft.mk files to files named MAKEFILE in their appropriate
directories, and then you wouldn't have to tell NMAKE to use a different
Makefile.

>           C:\NETCDF23\NMAKE /D[isplay] MAKEFILE.IN  --> Successfull ??

No, that won't work.  The Makefile.in is not a make target, it's a file
specifically intended for Unix systems that is input to the Unix configure
script to create a Makefile tailored to the system.  The Makefile.in files
are useless on non-Unix systems.
> 
>           C:\NETCDF23\NMAKE MSOFT.MK  --> Successfull ??(I think)??

No, that won't work.  You're telling NMAKE to create the MSOFT.MK target
from a set of sources according to a Make rule, and since there is no rule
for creating MSOFT.MK from sources, it won't do anything, except tell you

>                   'msoft.mk' is up-to-date

>              Somewhere I am missing a step because I cannot link the
>           example programs from Borland C or MS Fortran.  I downloaded
>           the Borland NetCDF and XDR libraries from your site as well
>           with no luck.

If you still can't build from sources and want to link your programs against
the already-built netCDF and binary libraries, I think you must use a
compiler that is compatible with the the way the libraries were built, so I
don't think you could link against the Borland libraries using MS Fortran.
NMAKE won't be any help for this unless you write your own makefile; you
just have to find out how to link a program against an already-compiled
compiled library.

>              Please direct me towards getting the correct PC libraries
>           up and running (linkable) on my machine.  Thanks for any
>           help you can offer.

We don't work with PCs much here, but just do the port to PCs as the last
step before a release.  We don't have access to the latest PC development
environments or tools, so we have to rely on others to port the libraries to
systems to which we have no access.  The PC libraries in our contrib/
directory are there because they were contributed by others, but we don't
support them directly.  The contributors in each case offered to answer
support questions about their contributions, so if you have specific
problems with one of the binary libraries, you'll have to contact the
contributor/author.

Good luck.

______________________________________________________________________________

Russ Rew                                           UCAR Unidata Program
address@hidden                              http://www.unidata.ucar.edu