In Visual Studio 2003 this can be done by modifying three of the project's properties.
Open the project properties window from the project menu. Go to the linker folder and look at the general properties. Modify the property “Additional Library Directories” by adding the directory which contains the netcdf.dll and netcdf.lib files. Now go to the linker input properties and set the property “Additional Dependencies” to netcdf.lib.
Finally, still within the project properties window, go to the C/C++ folder, and look at the general properties. Modify “Additional Include Directories” to add the directory with the netcdf.h file.
Now use the netCDF functions in your C++ code. Of course any C or C++ file that wants to use the functions will need: