Re: [netcdfgroup] Building netcdf-4.2 on Windows

Roy

I know this is a broken record, but has anyone successfully built netcdf-4.2 on Windows? Any help is greatly appreciated.


I am in the process of building netcdf 4.2 with Visual Studio 2010.

There is a working prototype at

http://www.space-research.org/

click on the "netcdf" menu and downlod the zip file.

disclaimer: by "working" I mean that at this time, it compiles, links the classic netcdf library and builds ncdump.

I started from scratch and I did not use the existing /win32/NET solution for a Visual Studio 2008 DLL.

I built Qt project files (.pro) by using the source and header files listed in the Makefile.am files ( that is, copying the source files in each Makefile.am to the corresponding Qt project file ".pro")

Qt is a framework for building cross platform GUIs

http://qt.nokia.com/products/

so, there are also Qt projects in the .zip

I used Qt because it has a plugin to generate a Visual Studio solution from the QT project ".pro" files;
this was the way the Visual Studio solution was made.

the solution has the projects:

/libsrc
/libdispatch
/ncdump

each one of these folders contains the Qt projects as well the Visual Studio projects.

the solution file is "netcdf.sln" at root

Qt has its own IDE called QtCreator that opens the "netcdf.pro" file located at root ( I did not try it with QtCreator though ).

I used a modified version of "config.h" at /win32/NET/config.h

changes made were:

/* #define DLL_NETCDF 1 */


I added these definitions that are also in ncconfigure.h, that seemed not to be included anywhere in the source files


/* from ncconfigure.h */
typedef unsigned char uchar;
typedef unsigned long long ulonglong;
typedef unsigned int uint;

#define nulldup(s) ((s)==NULL?NULL:strdup(s))

I added "getopt.c" in /win32/NET/getopt.c to the project

these are the only items needed from  /win32/NET

I will be updating this solution for a "full" port in the near future;

anyone feel free to send comments or suggestions :)

Pedro


----------------------
Pedro Vicente
pedro.vicente@xxxxxxxxxxxxxxxxxx
http://www.space-research.org/




----- Original Message ----- From: Roy Dennington
To: netcdfgroup@xxxxxxxxxxxxxxxx
Sent: Wednesday, March 21, 2012 5:15 PM
Subject: [netcdfgroup] Building netcdf-4.2 on Windows


All,

I know this is a broken record, but has anyone successfully built netcdf-4.2 on Windows? Any help is greatly appreciated. I need a very basic build: no DAP, no curl, no parallel, dll. I am desperate. I have not attempted a build since the refactor (4.1.1).

My current efforts show that a 32-bit build chokes on hsize_t:

libsrc4\nc4hdf.c(2050): error C2275: 'hsize_t' : illegal use of this type as an expression 1> c:\lib\hdf5-1.8.8\src\H5public.h(151) : see declaration of 'hsize_t'

typedef unsigned long long       hsize_t;

I tried both VS 2010 and Intel compilers.

Kind Regards,
Roy Dennington




_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/


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