Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: [netcdf-porting] NetCDF and Visual Studio 2008

NOTE: The netcdf-porting mailing list is no longer active. The list archives are made available for historical reasons.

Hi,

I still have not managed to compile NetCDF from sources, but the
3.6.1-win32 binaries plus the netcdf.h file from the 3.6.1 source
distribution did the job.

I found that adding the line

#pragma comment (lib, "netcdf")

to the <netcdf.h> file makes it much easier to use NetCDF from Visual
C++. This directive causes the linker to include "netcdf.lib", so you
do not need to edit linker options separately for each program. I hope
this tip is useful for other VC++ users.

Maciej.


  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-porting archives: