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.
To: <address@hidden> From: "Iain Buchanan" <address@hidden> Subject: re: netcdf support Organization: Powercorp Pty Ltd Keywords: 200107020728.f627Sw101016 netCDF C++ WindowsHi, I am having severe problems getting netcdf to work with c++ in the win32 environment (specifically windows nt5). I have spent days searching articles, readme's and faq's, but there is not a lot of help for the c++ interface. I have successfully compiled the libraries for the c interface, static and dll, but not for c++. Is there a pre-compiled c++ library? If
not, is there a makefile for compiling it for c++?
We do not have a precompiled version of the c++ library for windows, due to incompatabilities of the make files in the Windows envoronment. We are working on this, but our solution will use MS Visual C++ 6.0, and will likely not work using the Watcom compiler, which we do not have.
I have compiled a
library called libnetcdf_c++.a, but this seems to be a gcc library and does not seem to be compatible for watcom, which I am using. I cannot switch to gcc, because other areas of my program require libraries compatible with watcom and not with gcc. (Unfortunately these are commercial. - go open source!!). libnetcdf_c++.a seems to be made with netcdf.cpp and ncvalues.cpp, but when I make these (successfully) and link them as object files with my source, I still get the same undefined reference errors.
what are the error messages?I would post this question to address@hidden to see if anyone has made this work with Watcom.