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.
Hi Richard: > Hello, > I was able to compile netcdf using nmake. I would like to use in the > Microsoft Visual Studio C++ v6.0. I created a link to the netcdf.lib, > netcdf.h, netcdf.dll, etc... but when i tried to use nc_create() the > compiler returned a link error saying it could not find > nc_create(specifically, GenericDoc.obj : error LNK2001: > unresolved external > symbol _nc_create) ... I saw in the readme file that if im working in > Viusal Studio i should look at the Macros section. try nccreate(...) > Sorry, but im not clear how exactly to define NDEBUG or DLL_NETCDF and > DLL_EXPORT in the netcdf.h file. You dont need to define these if you are linking to the netcdf library, only if you are trying to build the netcdf library in VC++. If you were doing that, in VC5 set them using: Project / Settings / C++ / Category: Preprocessor / Preprocessor definitions VC6 is probably same or similar.