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.
> Date: Thu, 4 Dec 1997 10:28:48 +0100 > From: address@hidden (Vidyadhar Mudkavi) > To: address@hidden > Subject: thank you for your messages Hi, Thanks for all the feedback and information about your port of netCDF to Microsoft Developer Studio Visual C++ 4.0. I'm including your findings with this message to be filed in our support mail archives, so that others may benefit. We currently have no experience with this development environment, so I can't help with how to link multiple dynamic libraries. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu > at the time of receiving your mail, we had gone through the header > files and noted that there were two macros defined but not used: > NcValuesdeclare and NcValuesimplement. The documentation on c++ > interface clearly stated that the NcValues class is a base class for > other derived classes for nc_byte, nc_float etc. And, the macros for > NcValuesdeclare and NcValuesimplement clearly told us that these were > the necessary macros for declaring the derived classes (and also > implement them in the associated code file). So we simply used them in > the place of declare and implement macros and the compiler did the job > up to a point. We were faced with some other problem of use of mixed > libraries supplied by the msdv. we wanted to get back to you after > everything worked just fine. here is a brief summary of our porting > activities: > > 1. we used the ncconfig.h created after using the configure utility on the > sun machines and made appropriate changes to it. basically we need > to undefine have_st_blksize, words_bigendian, have_truncate and > define the ssize_t to int. > > 2. we needed to change the ncio.c to include only the posixio.c > file. strangely enough the msdv project file insists on including > the ffio.c as well as the posixio.c files eventhough the _CRAY is > not defined! > > 3. we can build both static and dynamic libraries for the c interface > and the utilities ncgen and ncdump with this. all of them worked ok > for us. > > 4. as for the c++ interface, we needed to make the changes you are > well aware of in the ncvalues.hh file. here, we left the generic.h > file as is and used the makename2 macro (already defined) to define > the declare and implement macros. also, we needed to change the > #include <strstream.h> to #include <strstrea.h> in the ncvalues.hh > file (it accommodates only eight letters for the file name). > > 5. we had some problem when we tried to make the basic c interface into a > dynamic library and try and make a c++ dynamic library as an > overlay. we are not aware as to how to link the two dynamic > libraries. but, we had no problem with the static libraries. we are > using the same for c++ interface now.