Thanks, Roy
I also learnt this during the weekend, and yes, the newest project files are
from VS2008. I tried to compile the 4.0.1b source by copying the solution and
project files from the 4.0 distribution (where they are from VS2003), but I got
into an endless stream of multiple/missing #defines and
double-defined/unresolved externals. I also got confused in all the versions
appearing at the same time, with at least two netcdf.h files and one
netcdf_base.h being almost equal.
No, I don't need the Fortran interface, but I need C++. I got this working
pretty easily in a former version (recipe posted to netcdflist Dec1-2006), but
so far I've just messed things up trying to get this working for 4.0.1b. At
some point (before including the C++ files) I actually had the netcdf library
built, but stumbled in some of the other projects.
What I also have learnt (thanks to John Caron, and also in the FAQ) is that
there is actually a pre-built binary distribution for Windows available. So
maybe my best bet is to use this and the old 2006 hack to get the C++ interface.
Unidata people: I aknowledge the reluctancy to maintain support on several
Windows compilers, but apart from the format of solution and project files, is
there much difference between VS2003, 2005 and 2008? If not, importing older
sln/vcproj files in newer compilers is a peace of cake, opposite using VS2008
sln/vcproj files in older compilers. Alternatively, if the project settings you
used in VS2008 (and which files to include for the different interfaces) could
be reported in some human-readable format, it would be a good guide.
Best regards,
Sjur K :-)
________________________________
From: Roy Dennington [mailto:roy@xxxxxxxxxxxx]
Sent: 31 oktober 2008 16:07
To: Kolberg Sjur A
Subject: RE: [netcdfgroup] NetCDF 4.0 on Windows?
You need to download netcdf-4.0.1b. Unfortunately, the project files
appear to be Studio 2008. You will have to put together your own project file
if you are using Visual Studio 2005. Do you need the FORTRAN interface?
Roy
From: netcdfgroup-bounces@xxxxxxxxxxxxxxxx
[mailto:netcdfgroup-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Kolberg Sjur A
Sent: Friday, October 31, 2008 9:43 AM
To: netcdfgroup@xxxxxxxxxxxxxxxx
Subject: [netcdfgroup] NetCDF 4.0 on Windows?
Hello :-)
Are there any plans to supply compiled binaries for NetCDF 4.0 or 3.6.3
on Windows?
The latest Windows pre-built binary is 3.6.1. I try to compile 4.0 from
source, after converting the Microsoft Visual Studio.NET (2003) project files
to Visual Studio 2005.
I first of all get the off_t / int64 conflict:
1>c:\program files\microsoft visual studio
8\vc\include\sys\types.h(101) : error C2632: 'long' followed by '__int64' is
illegal
types.h states:
#ifndef _OFF_T_DEFINED
typedef long _off_t; /* file offset value */
#if !__STDC__
/* Non-ANSI name for compatibility */
typedef long off_t; // This is line 101
#endif
#define _OFF_T_DEFINED
#endif
Preprocessor definitions are not what I know best. But I try to define
_OFF_T_DEFINED in project settings-preprocessor definitions; then I get:
1>c:\program files\microsoft visual studio 8\vc\include\sys\stat.h(118)
: error C2061: syntax error : identifier '_off_t'
from line 118 and other places in stat.h.
I am not sure about what I can do with the __STDC__ flag.
Does !__STDC__ mean NOT __STDC__ (as in code), and if so, is there
somewhere I can set this property?
Among other errors, the tarball distribution is missing two header
files which are #included elsewhere in the code. Are they really missing, or
was it never the intention that the files utf8proc.h and ncdump.c should be
read, or #included these two files?
1>c:\program files\netcdf-4.0\libsrc\utf8proc.h(79) : fatal error
C1083: Cannot open include file: 'inttypes.h': No such file or directory
2>c:\program files\netcdf-4.0\ncdump\ncdump.c(9) : fatal error C1083:
Cannot open include file: 'unistd.h': No such file or directory
Where shoud the symbol TEMP_LARGE be defined? (undeclared identifier)
If someone knows that building NetCDF on Windows using MSVC 2005 is
hopeless, please let me know and I won't break my neck on it. But if this
somehow "should work", I can continue trying, but I need some assistance.
I have pre-built HDF5-1.8.1 installed (works :-), but I might be
missing some environment variables or compiler settings.
Best regards,
Sjur Kolberg
SINTEF Energiforskning A/S
Sem Sælands vei 11
7465 Trondheim
tlf. 73 59 72 78
fax 73 59 72 50