PyTables:Installing hdf5

A

Ajith Prasad

I am trying to install the WinXP version of PyTables which requires
hdf5 (from http://hdf.ncsa.uiuc.edu/HDF5/) as a pre-requisite.
However, I am at a loss as to how to install hdf5 - I have downloaded
the zipped version of hdf5 and unzipped it using WinZip but get a mass
of .exe and other files and have no clue as to how to proceed further.
Thanks in advance for any help.
 
M

Maarten van Reeuwijk

Ajith said:
I am trying to install the WinXP version of PyTables which requires
hdf5 (from http://hdf.ncsa.uiuc.edu/HDF5/) as a pre-requisite.
However, I am at a loss as to how to install hdf5 - I have downloaded
the zipped version of hdf5 and unzipped it using WinZip but get a mass
of .exe and other files and have no clue as to how to proceed further.
Thanks in advance for any help.

I assume you downloaded the pre-compiled binary from
ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/bin/windows/

Unpack the zip to a temp-dir and copy all the data inside the
5-163-winxp-net directory to say c:\hdf5. Then look in COMPILE.TXT in the
DLL section to find the following instruction for compiling HDF-enabled
programs:

DLLs:
----
Copy the hdf5dll.dll, hdf5_cppdll.dll, zlib.dll, and szlibdll.dll files
from the location in the HDF5, szip, zlib binary distributions to the
WINNT\SYSTEM directory.

Bring up MSVC++ .NET.

Select File->New->Projects->"Visual C++ Projects". Then select
"Managed C++ Empty Project" and enter a name.

Select Project->Properties->Linker->Input
Enter "hdf5dll.lib hdf5_cppdll.lib zlib.lib szlibdll.lib" at the
beginning of the "Additional Dependencies" line.

Select Project->Properties->C/C++->Preprocessor
Under Preprocessor Definitions, add: _HDF5USEDLL_
For C++ DLLs, add: HDF5CPP_USEDLL

Select Project->Properties->C/C++->Code Generation->Runtime Library,
and choose "multi-threaded DLL"

Select Tools->Options->Projects->VC++ Directories.
Select "Include Files" under "Show directories for".
Enter the paths for the HDF5, szlib and zlib include files.
Then select "Library Files" under "Show directories for".
Enter the paths for the HDF5, szlib and zlib DLL exported libraries.

Select Build->Compile <program>. (C or C++ program)
Select Build->Build <xxx.exe>.
Select Build->Execute <xxx.exe>.


Copying the dll's is essential for installing PyTables, but I don't know how
the PyTables installer works under Windows.

HTH, Maarten
 
W

Waldemar Osuch

Ajith said:
I am trying to install the WinXP version of PyTables which requires
hdf5 (from http://hdf.ncsa.uiuc.edu/HDF5/) as a pre-requisite.
However, I am at a loss as to how to install hdf5 - I have downloaded
the zipped version of hdf5 and unzipped it using WinZip but get a mass
of .exe and other files and have no clue as to how to proceed further.
Thanks in advance for any help.

You are after *.dll files only:
After unzipping:
ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/hdf5-1.6.3/patches/bin/WinXP-patch.tar.gz
find hdf5.dll and copy it to system32 directory.
Do the same with this files:
ftp://ftp.ncsa.uiuc.edu/HDF/szip/bin/windows/szip-msvc++/szipbin/XP_vs6.0/dll/szlibdll.dll
ftp://ftp.ncsa.uiuc.edu/HDF/gzip/bin/windows/zlib114/dll/zlib.dll

Run the tests from PyTables to confirm that they pass with this versions
of *.dll

Waldemar.
 
A

Ajith Prasad

Thanks, Maareten. It certainly looks a formidable undertaking for a
non-programmer! I hope there will be a fully compiled version that
could be installed using a typical Windows installer.
 
P

prashna

Hi Maarten,
I am completely new to VC++ environment and trying to learn HDF5
format.
I copied the entire directory from
ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/bin/windows/ and also
ftp://ftp.ncsa.uiuc.edu/HDF/lib-external/zlib/and
ftp://ftp.ncsa.uiuc.edu/HDF/lib-external/szip/
I have followed all the steps that was explained in COMPILE.txt for
static libraries.But still, I am getting the following error...

Linking...
LINK : fatal error LNK1104: cannot open file "libm.lib"
Error executing link.exe.

Please let me know what else I have to do...

The steps I followed(copy-pasted from COMPILE.txt)

Bring up your Intel C++ or Fortran compiler under the Visual Studio
6.0 development environment.

Select File->New. Then select to create a "Win32 Console
Application"
and enter a name.

Select File->Open, and open up a C/C++/F90 program.

Select Project->Settings->Link
Enter the HDF5, ZLIB, and SZIP libraries at the beginning of the
"Object/library modules". These are the libraries:
hdf5.lib - HDF5 C Library
hdf5_cpp.lib - HDF5 C++ Library (optional)
hdf5_fortran.lib - HDF5 Fortran Library (optional)
zlib.lib szlib.lib - ZLIB and SZIP Libraries

Select Tools->Options->Directories.
Select "Include Files" under "Show directories for".
Enter the paths for the HDF5, szip, and zlib include files.
Then select "Library Files" under "Show directories for".
Enter the paths for the HDF5, szip, and zlib libraries.

Select Build->Compile <program>. (C, C++, F90 program)
Select Build->Build <xxx.exe>.
Select Build->Execute <xxx.exe>.

Thanks
 
M

Maarten van Reeuwijk

prashna said:
Hi Maarten,
I am completely new to VC++ environment and trying to learn HDF5
format.
I copied the entire directory from
ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/bin/windows/ and also
ftp://ftp.ncsa.uiuc.edu/HDF/lib-external/zlib/and
ftp://ftp.ncsa.uiuc.edu/HDF/lib-external/szip/
I have followed all the steps that was explained in COMPILE.txt for
static libraries.But still, I am getting the following error...

Linking...
LINK : fatal error LNK1104: cannot open file "libm.lib"
Error executing link.exe.

Dunno have no recent experience with VC++. Just google on "libm visual c++"
and follow the first link.

Maarten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top