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

Re: netcdf on PCs



> Organization: Finnigan-MAT
> Keywords: 199401141622.AA11615

Jim,

> Since I prefer Borland's compiler over the Microsoft stuff.  I have
> maintained a working version of the libraries and series of make files
> that I have provided to users who have asked the question in the past.
> 
> I can send any changes needed (only to one include file) and the
> necessary makefiles and Borland C configuration files to simplify the
> makes. 
> 
> Hopefully I can get these to you by next week.

Thanks for the offer, but someone else from USGS has already sent the
changes as well as binaries made for all four memory models, so I'll
probably be making those available soon.  Just for your info, I've appended
his note regarding the changes needed for Borland.

--Russ
__________________________________________________________________________
                      
Russ Rew                                              UCAR Unidata Program
address@hidden                                        P.O. Box 3000
(303)497-8645                                 Boulder, Colorado 80307-3000

Date: Tue, 18 Jan 94 06:50:29 EST
From: address@hidden (k.prada)
To: address@hidden
Subject: NetCDF Libraries for Borland

Russ,

The libraries to support Borland Turbo C++ (and presumably Borland C++)
are available via ftp from isdl.whoi.edu (128.128.92.66).  They are in
the pub directory in tar format in the file tcc_libs.tar.  There are 
library versions to support small, medium, large, and huge memory models.
The read.me file defines the file names.

The libraries were generated using the following procedure and generated
errors and warnings as described below.  Changes made are also described.

The sources were derived from a version 2.3.2 directory on my workstation.
The files were transferred to a 486/66 PC using PC-NFS.  The program "flip"
was used to convert each file to MSDOS format (CR-LF).  Makefiles specific
to Turbo C++ were generated using the "msoft.mk' files as templates.  The
netcdf and xdr libraries were compiled and tested in large model.
Corrections were made where necessary (see below).  When all was correct,
the additional memory models were generated.

XDR

Several WARNINGS were issued during compilation of xdr.c.  These all related
to an always false conditional in several of the functions.  Generated code
is OK and works properly.

Several warnings were issued during compilation of xdrtest.c.  These 
related to a compiler interpretation of the code resulting from the 
assert macro.  However, the code compiles and runs just fine.  I tested
the macro in a separate test source and looked at the compiled output.
It is OK.

Xdrtest ran fine with proper results.

NETCDF

In var.c at line 187, changed dims[] to *dims to correct a warning.

In xdrposix.c, there is no definition for off_t in the Borland /sys/types.h.
I inserted a "typedef long off_t" and fixed this.  Two other warnings were
issued by the compiler.  These appear to be of a minor nature and should not
affect operation.

NCTEST

Nctest compiled, linked and ran without warnings or errors.  Results
compared perfectly.

NCDUMP

Ncdump was compiled and linked with these libraries.  Ncdump was then run
on several files of differing types and sizes from a variety of sources.
In all cases, the results looked proper.

CONCLUSIONS

These libraries should work fine for use with both Turbo C++ and Borland
C++ (separate and different products).  I will be happy to help out with
any problems that relate to their use.  I will also help with the proper
inclusion of Borland support with the formal distribution if necessary.

Only two corrections to source files were necessary to generate the libraries.
Other changes may be necessary to eliminate all warnings.

I ran the same compilations using Borland C++ 3.1. With similar conclusions.
The only noticeable difference is a large output of "no prototype" warnings
during compilation of the xdr sources.  I was not surprised at these.

I have been using prior versions of netcdf compiled with an older
version of Turbo C (2.0) successfully for several years.  However, I
would not recommend the use of that older version with the latest
versions of netcdf.  Those using that version should upgrade if at all
possible. The upgrade costs are low.

..ken
___________________________________________________________________________
            Ken Prada                 |
Applied Ocean Physics and Engineering |       (508) 457-2000 Ext 2711       
Woods Hole Oceanographic Institution  |          address@hidden
  Woods Hole, Massachusetts  02543    |